DevPortal

How do I Write Singleton Services for Pramati Cluster?


A java class that implements com.pramati.services.cluster.spi.SingletonService interface can be configured as a Singleton service with Pramati Cluster. The SingletonService interface has three life cycle methods that are managed by the cluster service for providing the singleton behaviour.

Important: On any of the nodes in the cluster, these methods should be invoked maximum once during the life-time of the node.

SPI for com.pramati.services.cluster.spi.SingletonService

public interface SingletonService
  {
   public void initialize();
   public void start();
   public void stop();
  }


Related Topics:

© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal