org.apache.cassandra.db
Interface IClock

All Known Implementing Classes:
TimestampClock

public interface IClock

A clock used for conflict resolution.


Nested Class Summary
static class IClock.ClockRelationship
           
 
Method Summary
 IClock.ClockRelationship compare(IClock other)
           
 IClock getSuperset(java.util.List<IClock> otherClocks)
           
 void serialize(java.io.DataOutput out)
           
 int size()
           
 java.lang.String toString()
           
 ClockType type()
           
 

Method Detail

compare

IClock.ClockRelationship compare(IClock other)
Parameters:
other - Compare these two clocks.
Returns:
The relationship between the two clocks, lets us know if reconciliation will have to take place.

getSuperset

IClock getSuperset(java.util.List<IClock> otherClocks)
Parameters:
otherClocks - The other clock to use when extracting the superset.
Returns:
The superset of the two clocks.

size

int size()
Returns:
number of bytes this type of clock uses up when serialized.

type

ClockType type()
Returns:
the type of this clock.

serialize

void serialize(java.io.DataOutput out)
               throws java.io.IOException
Parameters:
out - Write a serialized representation of this clock to the output.
Throws:
java.io.IOException - Thrown if writing failed.

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a textual representation of this clock.


Copyright © 2010 The Apache Software Foundation