Class ActiveElectionState
java.lang.Object
net.jini.entry.AbstractEntry
com.j_spaces.lookup.entry.GenericEntry
com.gigaspaces.cluster.activeelection.core.ActiveElectionState
- All Implemented Interfaces:
SmartExternalizable, Externalizable, Serializable, Entry, ServiceControlled
public class ActiveElectionState
extends GenericEntry
implements ServiceControlled, SmartExternalizable
The election state attribute registered in conjunction with service candidate. This state
managed by 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.
ActiveElectionManager and modified on Naming service if the candidate service
acquire a new state. The following states are available:
NOTE: This state is ServiceControlled and can be modified only by service itself.
- Since:
- 5.2
- Version:
- 1.0
- Author:
- Igor Goldenberg
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionpublic no-args constructorconstruct this ActiveElectionState with the given State -
Method Summary
Methods inherited from interface SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
state
-
-
Constructor Details
-
ActiveElectionState
public ActiveElectionState()public no-args constructor -
ActiveElectionState
construct this ActiveElectionState with the given State- Parameters:
state- State of this active election
-
-
Method Details
-
getState
- Returns:
- the current state
-
setState
-
fromString
- Specified by:
fromStringin classGenericEntry
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-