voldemort.coordinator
Class CoordinatorUtils

java.lang.Object
  extended by voldemort.coordinator.CoordinatorUtils

public class CoordinatorUtils
extends java.lang.Object


Constructor Summary
CoordinatorUtils()
           
 
Method Summary
static java.lang.String constructSerializerInfoXml(StoreDefinition storeDefinition)
          Given a storedefinition, constructs the xml string to be sent out in response to a "schemata" fetch request
static VectorClock deserializeVectorClock(java.lang.String serializedVC)
           
static java.util.List<VectorClock> deserializeVectorClocks(java.lang.String serializedVC)
           
static java.lang.String getSerializedVectorClock(VectorClock vc)
          Function to serialize the given Vector clock into a string.
static java.lang.String getSerializedVectorClocks(java.util.List<VectorClock> vectorClocks)
          Function to serialize the given list of Vector clocks into a string.
static SerializerDefinition parseKeySerializerDefinition(java.lang.String serializerInfoXml)
          Given an xml string containing the store's serialization information, obtains the key serializer definition
static SerializerDefinition parseValueSerializerDefinition(java.lang.String serializerInfoXml)
          Given an xml string containing the store's serialization information, obtains the value serializer definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinatorUtils

public CoordinatorUtils()
Method Detail

getSerializedVectorClock

public static java.lang.String getSerializedVectorClock(VectorClock vc)
Function to serialize the given Vector clock into a string. If something goes wrong, it returns an empty string.

Parameters:
vc - The Vector clock to serialize
Returns:
The string (JSON) version of the specified Vector clock

deserializeVectorClock

public static VectorClock deserializeVectorClock(java.lang.String serializedVC)

getSerializedVectorClocks

public static java.lang.String getSerializedVectorClocks(java.util.List<VectorClock> vectorClocks)
Function to serialize the given list of Vector clocks into a string. If something goes wrong, it returns an empty string.

Parameters:
vectorClocks - The Vector clock list to serialize
Returns:
The string (JSON) version of the specified Vector clock

deserializeVectorClocks

public static java.util.List<VectorClock> deserializeVectorClocks(java.lang.String serializedVC)

constructSerializerInfoXml

public static java.lang.String constructSerializerInfoXml(StoreDefinition storeDefinition)
Given a storedefinition, constructs the xml string to be sent out in response to a "schemata" fetch request

Parameters:
storeDefinition -
Returns:
serialized store definition

parseKeySerializerDefinition

public static SerializerDefinition parseKeySerializerDefinition(java.lang.String serializerInfoXml)
Given an xml string containing the store's serialization information, obtains the key serializer definition

Parameters:
serializerInfoXml -
Returns:
key serializer definition

parseValueSerializerDefinition

public static SerializerDefinition parseValueSerializerDefinition(java.lang.String serializerInfoXml)
Given an xml string containing the store's serialization information, obtains the value serializer definition

Parameters:
serializerInfoXml -
Returns:
serializer definition


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu