org.mentacontainer.Scope Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of menta-container Show documentation
Show all versions of menta-container Show documentation
A IOC container as simple and pragmatic as it can get with programmatic configuration through a Fluent API.
The newest version!
package org.mentacontainer;
public enum Scope {
/**
* The container calls factory.getInstance on every request for the bean, returning always new instances.
*/
NONE,
/**
* The container calls factory.getInstance only once and caches the value, returning always the same instance.
*/
SINGLETON,
/**
* The container calls factory.getInstance and caches the value on a thread local, so the same thread will always get the same instance, at least until the scope is cleared by the client.
*/
THREAD
}