Class ProcedurePrepareLatch
java.lang.Object
org.apache.hadoop.hbase.master.procedure.ProcedurePrepareLatch
- Direct Known Subclasses:
ProcedurePrepareLatch.CompatibilityLatch
,ProcedurePrepareLatch.NoopLatch
Latch used by the Master to have the prepare() sync behaviour for old clients, that can only get
exceptions in a synchronous way.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
private static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
await()
protected abstract void
static ProcedurePrepareLatch
Creates a latch which blocks.static ProcedurePrepareLatch
Create a latch if the client does not have async proc support.static ProcedurePrepareLatch
createLatch
(int major, int minor) Create a latch if the client does not have async proc supportstatic ProcedurePrepareLatch
Returns the singleton latch which does nothing.private static boolean
hasProcedureSupport
(int major, int minor) static void
releaseLatch
(ProcedurePrepareLatch latch, Procedure proc)
-
Field Details
-
noopLatch
-
-
Constructor Details
-
ProcedurePrepareLatch
public ProcedurePrepareLatch()
-
-
Method Details
-
createLatch
Create a latch if the client does not have async proc support. This uses the default 1.1 version.- Returns:
- a CompatibilityLatch or a NoopLatch if the client has async proc support
-
createLatch
Create a latch if the client does not have async proc support- Parameters:
major
- major version with async proc supportminor
- minor version with async proc support- Returns:
- a CompatibilityLatch or a NoopLatch if the client has async proc support
-
createBlockingLatch
Creates a latch which blocks. -
getNoopLatch
Returns the singleton latch which does nothing. -
hasProcedureSupport
-
countDown
-
await
- Throws:
IOException
-
releaseLatch
-