org.apache.hadoop.hbase.master
Class RegionServerOperationQueue

java.lang.Object
  extended by org.apache.hadoop.hbase.master.RegionServerOperationQueue

public class RegionServerOperationQueue
extends Object

Keeps up the queue of RegionServerOperations. Has both live queue and a temporary put-aside queue; if processing of the live todo queue fails for some reason, we'll add the item back on the delay queue for retry later. Call shutdown() to effect a cleanup of queues when done. Listen to this queue by registering RegionServerOperationListeners.

See Also:
registerRegionServerOperationListener(RegionServerOperationListener), unregisterRegionServerOperationListener(RegionServerOperationListener)

Nested Class Summary
static class RegionServerOperationQueue.ProcessingResultCode
          Enums returned by process();
 
Method Summary
 RegionServerOperationQueue.ProcessingResultCode process()
          Try to get an operation off of the queue and process it.
 void put(org.apache.hadoop.hbase.master.RegionServerOperation op)
           
 void registerRegionServerOperationListener(RegionServerOperationListener l)
           
 void shutdown()
          Clean up the queues.
 boolean unregisterRegionServerOperationListener(RegionServerOperationListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

put

public void put(org.apache.hadoop.hbase.master.RegionServerOperation op)

process

public RegionServerOperationQueue.ProcessingResultCode process()
Try to get an operation off of the queue and process it.

Returns:
RegionServerOperationQueue.ProcessingResultCode.PROCESSED, RegionServerOperationQueue.ProcessingResultCode.REQUEUED, RegionServerOperationQueue.ProcessingResultCode.REQUEUED_BUT_PROBLEM

shutdown

public void shutdown()
Clean up the queues.


registerRegionServerOperationListener

public void registerRegionServerOperationListener(RegionServerOperationListener l)
Parameters:
l - Register this listener of RegionServerOperation events.

unregisterRegionServerOperationListener

public boolean unregisterRegionServerOperationListener(RegionServerOperationListener l)
Parameters:
l - Unregister this listener for RegionServerOperation events.
Returns:
True if this listener was registered.


Copyright © 2010 Apache Software Foundation. All Rights Reserved.