Interface ClusterSingletonService

All Superinterfaces:
Identifiable<ServiceGroupIdentifier>

public interface ClusterSingletonService extends Identifiable<ServiceGroupIdentifier>
ClusterSingletonService interface represents a single cluster service instance. It has to implement every service (RPCs or Applications) which would like to be instantiated on same Cluster Node. Grouping is realized by ServiceGroupIdentifier. Servicies with same ServiceGroupIdentifier have to run on same Cluster Node. ServiceGroupIdentifier must not change during whole ClusterSingletonService lifecycle.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method is invoked to close the underlying service instance when ownership has been lost for the service entity.
    void
    This method is invoked to instantiate an underlying service instance when ownership has been granted for the service entity.

    Methods inherited from interface org.opendaylight.yangtools.concepts.Identifiable

    getIdentifier
  • Method Details

    • instantiateServiceInstance

      void instantiateServiceInstance()
      This method is invoked to instantiate an underlying service instance when ownership has been granted for the service entity.
    • closeServiceInstance

      ListenableFuture<? extends Object> closeServiceInstance()
      This method is invoked to close the underlying service instance when ownership has been lost for the service entity. If the act of closing the instance may perform blocking operations or take some time, it should be done asynchronously to avoid blocking the current thread.
      Returns:
      a ListenableFuture that is completed when the underlying instance close operation is complete.