|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.DrainBarrier
@InterfaceAudience.Private public class DrainBarrier
A simple barrier that can be used by classes that need to wait for some operations to finish before stopping/closing/etc. forever.
Constructor Summary | |
---|---|
DrainBarrier()
|
Method Summary | |
---|---|
boolean |
beginOp()
Tries to start an operation. |
void |
endOp()
Ends the operation. |
void |
stopAndDrainOps()
Blocks new operations from starting, waits for the current ones to drain. |
void |
stopAndDrainOpsOnce()
Blocks new operations from starting, waits for the current ones to drain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DrainBarrier()
Method Detail |
---|
public boolean beginOp()
public void endOp()
public void stopAndDrainOps() throws InterruptedException
InterruptedException
- the wait for operations has been interrupted.public void stopAndDrainOpsOnce() throws InterruptedException
InterruptedException
- the wait for operations has been interrupted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |