Class AbstractSingletonService<C extends SingletonContext,S extends org.wildfly.clustering.server.manager.Service>
java.lang.Object
org.wildfly.clustering.singleton.server.AbstractSingletonService<C,S>
- All Implemented Interfaces:
Supplier<SingletonContextRegistration<C>>,org.jboss.msc.Service
- Direct Known Subclasses:
DistributedSingletonService,LegacyDistributedSingletonService
public abstract class AbstractSingletonService<C extends SingletonContext,S extends org.wildfly.clustering.server.manager.Service>
extends Object
implements org.jboss.msc.Service, Supplier<SingletonContextRegistration<C>>
Logic common to current and legacy
SingletonService implementations.- Author:
- Paul Ferraro
-
Field Summary
Fields inherited from interface org.jboss.msc.Service
NULL -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSingletonService(SingletonServiceContext context, Function<org.jboss.msc.service.ServiceTarget, S> serviceFactory, BiFunction<SingletonServiceContext, S, SingletonContextRegistration<C>> contextFactory, Consumer<Singleton> singleton) -
Method Summary
-
Constructor Details
-
AbstractSingletonService
public AbstractSingletonService(SingletonServiceContext context, Function<org.jboss.msc.service.ServiceTarget, S> serviceFactory, BiFunction<SingletonServiceContext, S, SingletonContextRegistration<C>> contextFactory, Consumer<Singleton> singleton)
-
-
Method Details
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException - Specified by:
startin interfaceorg.jboss.msc.Service- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context) - Specified by:
stopin interfaceorg.jboss.msc.Service
-
get
- Specified by:
getin interfaceSupplier<C extends SingletonContext>
-