|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.async.ProcessingBucket<I>
I - the type of the work items processed by the bucketpublic class ProcessingBucket<I>
ProcessingBucket instances are used a striped collection to store the work items that are awaiting processing on each node.
| Method Summary | |
|---|---|
void |
add(I item)
Enqueue an item for execution by this bucket. |
void |
addListener(ProcessingBucketListener listener)
Register a ProcessingBucketListener with this bucket. |
long |
getLastProcessing()
Returns the time at which item processing last occurred. |
int |
getQuarantinedCount()
Returns the number of items selected for execution by this bucket. |
String |
getThreadName()
Return the name used (or to be used) by this bucket's processing thread. |
int |
getWaitCount()
Returns the number of items awaiting processing in this bucket. |
void |
removeListener(ProcessingBucketListener listener)
Remove a ProcessingBucketListener from this bucket's listeners. |
void |
setQuarantinedItemsFilter(QuarantinedItemsFilter<I> filter)
Assign a quarantined item filter to this bucket. |
void |
setThreadName(String name)
Set the name to be used by this bucket's processing thread |
void |
stop()
Stops this bucket, and prevents it from executing any more items. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public long getLastProcessing()
public void setQuarantinedItemsFilter(QuarantinedItemsFilter<I> filter)
filter - filter to applyAsyncCoordinator.setQuarantinedItemsFilter(QuarantinedItemsFilter)public int getWaitCount()
public int getQuarantinedCount()
public void stop()
public void add(I item)
If the item is null then it is ignored.
item - item to be executed
public void setThreadName(String name)
throws ExistingRunningThreadException
name - thread name
ExistingRunningThreadException - if this bucket is already startedpublic String getThreadName()
If the name is not yet defined then null is returned
public void addListener(ProcessingBucketListener listener)
ProcessingBucketListener with this bucket.
If the listener is null, or the listener is already registered with this bucket, then this operation is a no-op.
listener - listener to be registeredpublic void removeListener(ProcessingBucketListener listener)
ProcessingBucketListener from this bucket's listeners.
If the listener is null, or the listener is not registered with this bucket, then this operation is a no-op.
listener - listener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||