org.terracotta.async
Interface ProcessingBucketListener


public interface ProcessingBucketListener

ProcessingBucketListener instances can be registered with ProcessingBucket instances in order to receive notifications related to the bucket's activity.


Method Summary
 void nothingToProcess()
          Called when attempt was made to process work, but no work was available for the linked bucket.
 void processingFinished()
          Called after a linked bucket completes execution of a batch of work.
 void processingStarted(int itemCount)
          Called before a linked bucket attempts to execute a batch of work.
 void started()
          Called when a linked bucket starts processing.
 void stealingDelayed()
          Called when a linked bucket attempted to steal, but was prevented for some reason.
 void stoleWork(int itemCount)
          Called when a linked bucket successfully stole work from another bucket.
 void stopped()
          Called after a linked bucket is stopped (terminated).
 

Method Detail

started

void started()
Called when a linked bucket starts processing.


stealingDelayed

void stealingDelayed()
Called when a linked bucket attempted to steal, but was prevented for some reason.


stoleWork

void stoleWork(int itemCount)
Called when a linked bucket successfully stole work from another bucket.

Parameters:
itemCount - the number of items stolen

nothingToProcess

void nothingToProcess()
Called when attempt was made to process work, but no work was available for the linked bucket.


processingStarted

void processingStarted(int itemCount)
Called before a linked bucket attempts to execute a batch of work.

Parameters:
itemCount - the number of items in the batch

processingFinished

void processingFinished()
Called after a linked bucket completes execution of a batch of work.

Completion may occur after executing all items, or after failing to execute.


stopped

void stopped()
Called after a linked bucket is stopped (terminated).



Copyright © 2015 Terracotta, Inc.. All Rights Reserved.