Package com.j_spaces.lookup.entry
Class State
java.lang.Object
net.jini.entry.AbstractEntry
com.j_spaces.lookup.entry.GenericEntry
com.j_spaces.lookup.entry.State
- All Implemented Interfaces:
SmartExternalizable,Externalizable,Serializable,Entry,ServiceControlled
The State entry represents the current service state. The State has primary state - @see
com.j_spaces.core.ISpaceState and secondary states. Secondary states are internal states and
shouldn't be used in space lookup.
electable - state that indicates whether the space can participate in election . replicable -
state that indicates whether the space is ready for replication. - Since:
- 5.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromString(String state) voidvoidsetElectable(Boolean electable) This state is changed to true on space startup and set to false only at space shutdown or stopsetReplicable(Boolean replicable) This state is set to true after space recovery and set to false when space is stopped or shutdownvoidMethods inherited from class net.jini.entry.AbstractEntry
equals, equals, hashCode, hashCode, toString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
state
-
electable
-
replicable
-
-
Constructor Details
-
State
-
State
Construct a State- Parameters:
state- A state value
-
State
public State(int state) Construct a State -
State
public State()Construct a State with null attributes
-
-
Method Details
-
isElectable
- Returns:
- true if the state is electable
-
setElectable
This state is changed to true on space startup and set to false only at space shutdown or stop -
getReplicable
-
setReplicable
This state is set to true after space recovery and set to false when space is stopped or shutdown -
fromString
- Specified by:
fromStringin classGenericEntry
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-