|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.lang.Integer |
getMasterPartition(byte[] key)
Obtain the master partition for a given key |
java.util.Set<Node> |
getNodes()
Get the collection of nodes that are candidates for routing. |
int |
getNumReplicas()
Return the number of replicas |
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.lang.String |
getType()
Get the type of RoutingStrategyType |
java.util.List<Node> |
routeRequest(byte[] key)
Get the node preference list for the given key. |
| Method Detail |
|---|
java.lang.String getType()
java.util.List<Node> routeRequest(byte[] key)
key - The key the operation is operating on
java.util.List<java.lang.Integer> getPartitionList(byte[] key)
key - The key the operation is operating on
java.lang.Integer getMasterPartition(byte[] key)
key - The key being operated on
java.util.List<java.lang.Integer> getReplicatingPartitionList(int partitionId)
partitionId -
java.util.Set<Node> getNodes()
int getNumReplicas()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||