public class XORManager
extends java.lang.Object
Constructor and Description |
---|
XORManager(WakeableLooper looper,
int timeoutSec,
java.util.List<java.lang.Integer> taskIds,
int nBuckets) |
Modifier and Type | Method and Description |
---|---|
boolean |
anchor(int taskId,
long key,
long value) |
void |
create(int taskId,
long key,
long value) |
protected java.util.Map<java.lang.Integer,RotatingMap> |
getSpoutTasksToRotatingMap() |
static XORManager |
populateXORManager(WakeableLooper looper,
TopologyAPI.Topology topology,
int nBuckets,
java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> componentToTaskIds)
Populate the XORManager for all spouts for the topology.
|
boolean |
remove(int taskId,
long key) |
protected void |
rotate() |
public XORManager(WakeableLooper looper, int timeoutSec, java.util.List<java.lang.Integer> taskIds, int nBuckets)
public static XORManager populateXORManager(WakeableLooper looper, TopologyAPI.Topology topology, int nBuckets, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> componentToTaskIds)
looper
- The WakeableLooper to execute timer eventtopology
- The given topology protobufnBuckets
- number of buckets to divide the message timeout secondscomponentToTaskIds
- the map of componentName to its list of taskIds in the topologypublic void create(int taskId, long key, long value)
public boolean anchor(int taskId, long key, long value)
public boolean remove(int taskId, long key)
protected void rotate()
protected java.util.Map<java.lang.Integer,RotatingMap> getSpoutTasksToRotatingMap()