GigaSpaces XAP 9.7.2 API

com.sun.jini.thread
Class ReadyState

java.lang.Object
  extended by com.sun.jini.thread.ReadyState

public class ReadyState
extends Object

Utility class used to prevent access to a service before it has completed its initialization or after it starts to shutdown. Each public entry point to the service should call check or shutdown, and initialization should call ready when the service is ready to use.

Since:
2.1
Author:
Sun Microsystems, Inc.

Constructor Summary
ReadyState()
           
 
Method Summary
 void check()
          Checks if the service is ready to use, waiting if it is initializing, and throwing NoSuchObjectException if it is shutting down.
 boolean isReady()
           
 void ready()
          Marks the service ready for use.
 void shutdown()
          Marks the service as shutting down, waiting if it is initializing, and throwing NoSuchObjectException if it is already shutting down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadyState

public ReadyState()
Method Detail

isReady

public boolean isReady()

check

public void check()
Checks if the service is ready to use, waiting if it is initializing, and throwing NoSuchObjectException if it is shutting down. Note that the NoSuchObjectException will be wrapped in a RemoteExceptionWrapper.


ready

public void ready()
Marks the service ready for use. This method should only be called from the code that performs the service initialization, and it should only be called once.


shutdown

public void shutdown()
Marks the service as shutting down, waiting if it is initializing, and throwing NoSuchObjectException if it is already shutting down. Note that the NoSuchObjectException will be wrapped in a RemoteExceptionWrapper.


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.