Class AbstractDistributedSingletonService<C extends SingletonContext>
java.lang.Object
org.wildfly.clustering.singleton.server.AbstractDistributedSingletonService<C>
- All Implemented Interfaces:
Supplier<C>,org.jboss.msc.Service,ServiceProviderRegistration.Listener,Lifecycle,SingletonContext,SingletonService,Singleton,SingletonElectionListener
- Direct Known Subclasses:
DistributedSingletonService,LegacyDistributedSingletonService
public abstract class AbstractDistributedSingletonService<C extends SingletonContext>
extends Object
implements SingletonService, SingletonContext, ServiceProviderRegistration.Listener, Supplier<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
ConstructorsConstructorDescriptionAbstractDistributedSingletonService(DistributedSingletonServiceContext context, Function<org.jboss.msc.service.ServiceTarget, Lifecycle> primaryLifecycleFactory) -
Method Summary
-
Constructor Details
-
AbstractDistributedSingletonService
public AbstractDistributedSingletonService(DistributedSingletonServiceContext context, Function<org.jboss.msc.service.ServiceTarget, Lifecycle> primaryLifecycleFactory)
-
-
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
-
providersChanged
- Specified by:
providersChangedin interfaceServiceProviderRegistration.Listener
-
start
public void start()Description copied from interface:LifecycleStart this object. -
stop
public void stop()Description copied from interface:LifecycleStop this object. -
elected
- Specified by:
electedin interfaceSingletonElectionListener
-
isPrimary
public boolean isPrimary() -
getPrimaryProvider
- Specified by:
getPrimaryProviderin interfaceSingleton
-
getProviders
- Specified by:
getProvidersin interfaceSingleton
-