com.gigaspaces.cluster.activeelection.core
Class ActiveElectionState
java.lang.Object
  
net.jini.entry.AbstractEntry
      
com.j_spaces.lookup.entry.GenericEntry
          
com.gigaspaces.cluster.activeelection.core.ActiveElectionState
- All Implemented Interfaces: 
 - Externalizable, Serializable, Entry, ServiceControlled
 
public class ActiveElectionState
- extends com.j_spaces.lookup.entry.GenericEntry
- implements ServiceControlled, Externalizable
  
The election state attribute registered in conjunction with service candidate. 
 This state managed by ActiveElectionManager and modified on Naming service if the candidate
 service aquire a new state.
 
 The following states are available:
 
NONE       - The service is not initialized yet. 
 PENDING - The service is a candidate to acquire PREPARE state. 
 PREPARE - The service is a candidate to acquire an ACTIVE state. 
 ACTIVE  - The service become to be an ACTIVE. 
 
 
 NOTE: This state is ServiceControlled and can be modified only by service itself.
- Since:
 
  - 5.2
 
- See Also:
 ActiveElectionManager, 
ActiveElectionState.State, 
Serialized Form
 
 
 
 
 
 
state
public String state
ActiveElectionState
public ActiveElectionState()
- public no-args constructor
 
getState
public ActiveElectionState.State getState()
 
- Returns:
 - the current state
 
 
fromString
public Entry fromString(String state)
- Specified by:
 fromString in class com.j_spaces.lookup.entry.GenericEntry
 
 
writeExternal
public void writeExternal(ObjectOutput out)
                   throws IOException
- Specified by:
 writeExternal in interface Externalizable
 
- Throws:
 IOException
 
readExternal
public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
- Specified by:
 readExternal in interface Externalizable
 
- Throws:
 IOException
ClassNotFoundException