com.netflix.astyanax.query
Interface CheckpointManager

All Known Implementing Classes:
AstyanaxCheckpointManager, EmptyCheckpointManager

public interface CheckpointManager

Interface for tracking checkpoints for a getAllRows query. The entire token range is split into a sorted set of start tokens. Each start token is mapped to a checkpoint with the following possible values 1. startToken - start of the token range 2. nextToken - the checkpoint equals the next token in the sorted set of start tokens. This means the range is done 3. > startToken AND < nextToken - a valid checkpoint


Method Summary
 java.lang.String getCheckpoint(java.lang.String startToken)
          Get the next checkpoint after the specified token.
 java.util.SortedMap<java.lang.String,java.lang.String> getCheckpoints()
          Return a sorted map of start tokens to their checkpoint
 void trackCheckpoint(java.lang.String startToken, java.lang.String checkpointToken)
          Track the checkpoint for a specific range
 

Method Detail

trackCheckpoint

void trackCheckpoint(java.lang.String startToken,
                     java.lang.String checkpointToken)
                     throws java.lang.Exception
Track the checkpoint for a specific range

Parameters:
startToken -
checkpointToken -
Throws:
java.lang.Exception

getCheckpoint

java.lang.String getCheckpoint(java.lang.String startToken)
                               throws java.lang.Exception
Get the next checkpoint after the specified token. Will return null if no checkpoint was set.

Throws:
java.lang.Exception

getCheckpoints

java.util.SortedMap<java.lang.String,java.lang.String> getCheckpoints()
                                                                      throws java.lang.Exception
Return a sorted map of start tokens to their checkpoint

Throws:
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
java.lang.Exception