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
Nested ClassesModifier and TypeClassDescriptionprotected static classprivate static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidawait()protected abstract voidstatic ProcedurePrepareLatchCreates a latch which blocks.static ProcedurePrepareLatchCreate a latch if the client does not have async proc support.static ProcedurePrepareLatchcreateLatch(int major, int minor) Create a latch if the client does not have async proc supportstatic ProcedurePrepareLatchReturns the singleton latch which does nothing.private static booleanhasProcedureSupport(int major, int minor) static voidreleaseLatch(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
-