What are the Life Cycle Methods of Singleton Services?
Following are the various life cycle methods of Singleton Services:
start: This method is invoked on the node that starts the Singleton service. This method encapsulates the service behavior and is invoked everytime the Singleton service comes up. This method is always invoked in a new thread context.
stop: This method is invoked when the node on which the singleton service is running is shutdown. This method is not expected to be invoked when the cluster node crashes. This method can be used to provide the necessary cleanup for a Singleton service.
initialize: This method is required for initializing the service for startup. Invocation of this method is similar to that of start and is invoked immediately before the start method.