|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Partitioner
Implements an algorithm to divide replicator events into partitions. This is used to support channel assignment in parallel apply. The partitioning algorithm must be idempotent and must result in the same channel assignment for a specific shard. The algorithm may change only after a clean shutdown, i.e., following an offline operation.
Channels were called "partitions" in the original parallel apply implementation. The terms partition and channel are equivalent in the code. Only channel should be used for user-visible interfaces, configuration files, and documentation.
| 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. |
| Method Detail |
|---|
void setPartitions(int availablePartitions)
availablePartitions - Number of partitions availablevoid setContext(PluginContext context)
context - Replicator runtime context
PartitionerResponse partition(ReplDBMSHeader event,
int taskId)
throws ReplicatorException
event - Event to be assigned a partitiontaskId - Task id of input thread
ReplicatorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||