|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.storage.parallel.HashPartitioner
public class HashPartitioner
Implements a simple shard partitioner that hashes on the shard name. #UNKNOWN shards are assumed to be critical, hence must be serialized.
| Constructor Summary | |
|---|---|
HashPartitioner()
|
|
| Method Summary | |
|---|---|
PartitionerResponse |
partition(ReplDBMSHeader event,
int taskId)
Assign an event to a particular partition. |
void |
setContext(PluginContext context)
Assigns the current runtime context in case the partitioner needs to refer to replicator state. |
void |
setPartitions(int availablePartitions)
Sets the number of available partitions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashPartitioner()
| Method Detail |
|---|
public void setPartitions(int availablePartitions)
setPartitions in interface PartitioneravailablePartitions - Number of partitions availablePartitioner.setPartitions(int)public void setContext(PluginContext context)
setContext in interface Partitionercontext - Replicator runtime contextPartitioner.setContext(com.continuent.tungsten.replicator.plugin.PluginContext)
public PartitionerResponse partition(ReplDBMSHeader event,
int taskId)
throws ReplicatorException
partition in interface Partitionerevent - Event to be assigned a partitiontaskId - Task id of input thread
ReplicatorExceptionPartitioner.partition(com.continuent.tungsten.replicator.event.ReplDBMSHeader,
int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||