@InterfaceAudience.Private public class DrainBarrier extends Object
Constructor and Description |
---|
DrainBarrier() |
Modifier and Type | Method and Description |
---|---|
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.
|
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.