Class | Needle::Lifecycle::Threaded
In: | lib/needle/lifecycle/threaded.rb
Parent: | Needle::Pipeline::Element

The instantiation pipeline element that enforces the singleton multiplicity, on a per-thread basis.

### Methods

call reset! service_cache

### Public Instance methods

call( container, point )

Returns the cached reference, if it has been previously cached for the current thread. Otherwise, invokes the next element in the pipeline and caches the result. The cached reference is returned.

reset!()

Resets the cached singleton instance, so that the next time it is requested it is re-constructed. Only the cache for the current thread and service point is reset.

service_cache()

Returns a Hash of threaded services that are cached by the current thread.

[Validate]