Package javax.cache.configuration
Class FactoryBuilder.SingletonFactory<T>
java.lang.Object
javax.cache.configuration.FactoryBuilder.SingletonFactory<T>
- Type Parameters:
T- the type of the instance produced by theFactory
- All Implemented Interfaces:
Serializable,Factory<T>
- Enclosing class:
FactoryBuilder
public static class FactoryBuilder.SingletonFactory<T>
extends Object
implements Factory<T>, Serializable
A
Factory that always returns a specific instance. ie: the
factory returns a singleton, regardless of the number of times
Factory.create() is called.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TThe singleton instance.static final longThe serialVersionUID required forSerializable. -
Constructor Summary
ConstructorsConstructorDescriptionSingletonFactory(T instance) Constructor for theFactoryBuilder.SingletonFactory. -
Method Summary
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDThe serialVersionUID required forSerializable.- See Also:
-
instance
The singleton instance.
-
-
Constructor Details
-
SingletonFactory
Constructor for theFactoryBuilder.SingletonFactory.- Parameters:
instance- the instance to return
-
-
Method Details