|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.routing.RouteToAllStrategy
public class RouteToAllStrategy
A routing strategy which just routes each request to all the nodes given. Pretend that there is one partition ID "0" that all keys map to and that is replicated on all nodes.
Constructor Summary | |
---|---|
RouteToAllStrategy(java.util.Collection<Node> nodes)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RouteToAllStrategy(java.util.Collection<Node> nodes)
Method Detail |
---|
public int getNumReplicas()
RoutingStrategy
getNumReplicas
in interface RoutingStrategy
public java.util.List<Node> routeRequest(byte[] key)
RoutingStrategy
routeRequest
in interface RoutingStrategy
key
- The key the operation is operating on
public java.util.Set<Node> getNodes()
RoutingStrategy
getNodes
in interface RoutingStrategy
public java.util.List<java.lang.Integer> getPartitionList(byte[] key)
RoutingStrategy
RoutingStrategy.getReplicatingPartitionList(int)
that
takes a key. So, would be good to rename this also as
getReplicatingPartitionList
getPartitionList
in interface RoutingStrategy
key
- The key the operation is operating on
public java.util.List<java.lang.Integer> getReplicatingPartitionList(int partitionId)
RoutingStrategy
getReplicatingPartitionList
in interface RoutingStrategy
public java.lang.Integer getMasterPartition(byte[] key)
getMasterPartition
in interface RoutingStrategy
key
-
public java.lang.String getType()
RoutingStrategy
getType
in interface RoutingStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |