com.gigaspaces.cluster.activeelection.core
Class ActiveElectionState

java.lang.Object
  extended by net.jini.entry.AbstractEntry
      extended by com.j_spaces.lookup.entry.GenericEntry
          extended by com.gigaspaces.cluster.activeelection.core.ActiveElectionState
All Implemented Interfaces:
Serializable, Entry, ServiceControlled

public class ActiveElectionState
extends com.j_spaces.lookup.entry.GenericEntry
implements ServiceControlled

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 aquire PREPARE state.
  • PREPARE - The service is a candidate to aquire 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

    Nested Class Summary
    static class ActiveElectionState.State
              Service states
     
    Field Summary
     String state
               
     
    Constructor Summary
    ActiveElectionState()
              public no-args constructor
     
    Method Summary
     Entry fromString(String state)
               
     ActiveElectionState.State getState()
               
     
    Methods inherited from class net.jini.entry.AbstractEntry
    equals, equals, hashCode, hashCode, toString, toString
     
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, wait, wait, wait
     

    Field Detail

    state

    public String state
    Constructor Detail

    ActiveElectionState

    public ActiveElectionState()
    public no-args constructor

    Method Detail

    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