org.apache.cassandra.gms
Class VersionedValue

java.lang.Object
  extended by org.apache.cassandra.gms.VersionedValue
All Implemented Interfaces:
java.lang.Comparable<VersionedValue>

public class VersionedValue
extends java.lang.Object
implements java.lang.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(); Gossiper.instance.addApplicationState("LOAD STATE", loadState);


Nested Class Summary
static class VersionedValue.VersionedValueFactory
           
 
Field Summary
static char DELIMITER
           
static java.lang.String DELIMITER_STR
           
static java.lang.String REMOVED_TOKEN
           
static java.lang.String REMOVING_TOKEN
           
static ICompactSerializer<VersionedValue> serializer
           
static java.lang.String STATUS_BOOTSTRAPPING
           
static java.lang.String STATUS_LEAVING
           
static java.lang.String STATUS_LEFT
           
static java.lang.String STATUS_NORMAL
           
 java.lang.String value
           
 int version
           
 
Method Summary
 int compareTo(VersionedValue value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serializer

public static final ICompactSerializer<VersionedValue> serializer

DELIMITER

public static final char DELIMITER
See Also:
Constant Field Values

DELIMITER_STR

public static final java.lang.String DELIMITER_STR

STATUS_BOOTSTRAPPING

public static final java.lang.String STATUS_BOOTSTRAPPING
See Also:
Constant Field Values

STATUS_NORMAL

public static final java.lang.String STATUS_NORMAL
See Also:
Constant Field Values

STATUS_LEAVING

public static final java.lang.String STATUS_LEAVING
See Also:
Constant Field Values

STATUS_LEFT

public static final java.lang.String STATUS_LEFT
See Also:
Constant Field Values

REMOVING_TOKEN

public static final java.lang.String REMOVING_TOKEN
See Also:
Constant Field Values

REMOVED_TOKEN

public static final java.lang.String REMOVED_TOKEN
See Also:
Constant Field Values

version

public final int version

value

public final java.lang.String value
Method Detail

compareTo

public int compareTo(VersionedValue value)
Specified by:
compareTo in interface java.lang.Comparable<VersionedValue>


Copyright © 2010 The Apache Software Foundation