Class AtomicReferenceService<T extends AutoCloseable>
java.lang.Object
org.wildfly.clustering.server.service.AtomicReferenceService<T>
- Type Parameters:
T- the operating type
- All Implemented Interfaces:
Service
A simple service facade to an AutoCloseable factory.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionAtomicReferenceService(org.wildfly.clustering.function.Supplier<T> factory) Creates a simple service from the specified value factory.AtomicReferenceService(org.wildfly.clustering.function.Supplier<T> factory, AtomicReference<T> reference) Creates a simple service from the specified value factory. -
Method Summary
-
Constructor Details
-
AtomicReferenceService
Creates a simple service from the specified value factory.- Parameters:
factory- a value factory
-
AtomicReferenceService
public AtomicReferenceService(org.wildfly.clustering.function.Supplier<T> factory, AtomicReference<T> reference) Creates a simple service from the specified value factory.- Parameters:
factory- a value factoryreference- a reference to the service value
-
-
Method Details
-
isStarted
-
start
-
stop
-