|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.contrib.index.example.RoundRobinDistributionPolicy
public class RoundRobinDistributionPolicy
Choose a shard for each insert in a round-robin fashion. Choose all the shards for each delete because we don't know where it is stored.
| Constructor Summary | |
|---|---|
RoundRobinDistributionPolicy()
|
|
| Method Summary | |
|---|---|
int |
chooseShardForDelete(DocumentID key)
Choose a shard or all shards to send a delete request. |
int |
chooseShardForInsert(DocumentID key)
Choose a shard to send an insert request. |
void |
init(Shard[] shards)
Initialization. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoundRobinDistributionPolicy()
| Method Detail |
|---|
public void init(Shard[] shards)
IDistributionPolicy
init in interface IDistributionPolicypublic int chooseShardForInsert(DocumentID key)
IDistributionPolicy
chooseShardForInsert in interface IDistributionPolicypublic int chooseShardForDelete(DocumentID key)
IDistributionPolicy
chooseShardForDelete in interface IDistributionPolicy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||