voldemort.routing
Interface RoutingStrategy

All Known Implementing Classes:
ConsistentRoutingStrategy, RouteToAllStrategy

public interface RoutingStrategy

A routing strategy maps puts and gets to an ordered "preference list" of servers. The preference list is the order under which operations will be completed in the absence of failures.


Method Summary
 java.util.Set<Node> getNodes()
          Get the collection of nodes that are candidates for routing.
 java.util.List<java.lang.Integer> getPartitionList(byte[] key)
          Get the partition list for the given key.
 java.util.List<java.lang.Integer> getReplicatingPartitionList(int partitionId)
          Get the replication partitions list for the given partition.
 java.util.List<Node> routeRequest(byte[] key)
          Get the node preference list for the given key.
 

Method Detail

routeRequest

java.util.List<Node> routeRequest(byte[] key)
Get the node preference list for the given key. The preference list is a list of nodes to perform an operation on.

Parameters:
key - The key the operation is operating on
Returns:
The preference list for the given key

getPartitionList

java.util.List<java.lang.Integer> getPartitionList(byte[] key)
Get the partition list for the given key.

Parameters:
key - The key the operation is operating on
Returns:
The partition list for the given key

getReplicatingPartitionList

java.util.List<java.lang.Integer> getReplicatingPartitionList(int partitionId)
Get the replication partitions list for the given partition.

Parameters:
partitionId -
Returns:
The List of partitionId where this partition is replicated.

getNodes

java.util.Set<Node> getNodes()
Get the collection of nodes that are candidates for routing.

Returns:
The collection of nodes


Jay Kreps