Package org.apache.cassandra.gms
Class VersionedValue
java.lang.Object
org.apache.cassandra.gms.VersionedValue
- All Implemented Interfaces:
Comparable<VersionedValue>
This abstraction represents the state associated with a particular node which an
application wants to make available to the rest of the nodes in the cluster.
Whenever a piece of state needs to be disseminated to the rest of cluster wrap
the state in an instance of ApplicationState and add it to the Gossiper.
e.g. if we want to disseminate load information for node A do the following:
ApplicationState loadState = new ApplicationState(<string representation of load>);
Gossiper.instance.addApplicationState("LOAD STATE", loadState);
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final IVersionedSerializer<VersionedValue>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringfinal Stringfinal int -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(VersionedValue value) booleaninthashCode()byte[]toBytes()toString()static VersionedValueunsafeMakeVersionedValue(String value, int version) withVersion(int version)
-
Field Details
-
serializer
-
DELIMITER
public static final char DELIMITER- See Also:
-
DELIMITER_STR
-
STATUS_BOOTSTRAPPING
- See Also:
-
STATUS_BOOTSTRAPPING_REPLACE
- See Also:
-
STATUS_NORMAL
- See Also:
-
STATUS_LEAVING
- See Also:
-
STATUS_LEFT
- See Also:
-
STATUS_MOVING
- See Also:
-
REMOVING_TOKEN
- See Also:
-
REMOVED_TOKEN
- See Also:
-
HIBERNATE
- See Also:
-
SHUTDOWN
- See Also:
-
REMOVAL_COORDINATOR
- See Also:
-
BOOTSTRAPPING_STATUS
-
version
public final int version -
value
-
-
Method Details
-
withVersion
-
unsafeMakeVersionedValue
-
compareTo
- Specified by:
compareToin interfaceComparable<VersionedValue>
-
toString
-
equals
-
hashCode
public int hashCode() -
toBytes
public byte[] toBytes()
-