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
  • Constructor Details

  • Method Details

    • start

      public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
      Specified by:
      start in interface org.jboss.msc.Service
      Throws:
      org.jboss.msc.service.StartException
    • stop

      public void stop(org.jboss.msc.service.StopContext context)
      Specified by:
      stop in interface org.jboss.msc.Service
    • providersChanged

      public void providersChanged(Set<Node> nodes)
      Specified by:
      providersChanged in interface ServiceProviderRegistration.Listener
    • start

      public void start()
      Description copied from interface: Lifecycle
      Start this object.
      Specified by:
      start in interface Lifecycle
    • stop

      public void stop()
      Description copied from interface: Lifecycle
      Stop this object.
      Specified by:
      stop in interface Lifecycle
    • elected

      public void elected(List<Node> candidates, Node elected)
      Specified by:
      elected in interface SingletonElectionListener
    • isPrimary

      public boolean isPrimary()
      Specified by:
      isPrimary in interface Singleton
    • getPrimaryProvider

      public Node getPrimaryProvider()
      Specified by:
      getPrimaryProvider in interface Singleton
    • getProviders

      public Set<Node> getProviders()
      Specified by:
      getProviders in interface Singleton