Class CuratorDistributedPrimitive
- java.lang.Object
-
- org.apache.activemq.artemis.quorum.zookeeper.CuratorDistributedPrimitive
-
- All Implemented Interfaces:
AutoCloseable
public abstract class CuratorDistributedPrimitive extends Object implements AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceCuratorDistributedPrimitive.InterruptablePrimitiveAction<R,T extends Throwable>protected static interfaceCuratorDistributedPrimitive.PrimitiveAction<R,T extends Throwable>
-
Constructor Summary
Constructors Modifier Constructor Description protectedCuratorDistributedPrimitive(org.apache.activemq.artemis.quorum.zookeeper.CuratorDistributedPrimitiveManager.PrimitiveId id, CuratorDistributedPrimitiveManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckUnavailable()voidclose()protected voidfireUnavailableListener(Runnable task)protected voidhandleClosed()protected voidhandleLost()protected voidhandleReconnected()protected voidhandleSuspended()protected booleanisUnavailable()protected <R,T extends Throwable>
Rrun(CuratorDistributedPrimitive.PrimitiveAction<R,T> action)protected <R,T extends Throwable>
RtryRun(CuratorDistributedPrimitive.InterruptablePrimitiveAction<R,T> action)
-
-
-
Constructor Detail
-
CuratorDistributedPrimitive
protected CuratorDistributedPrimitive(org.apache.activemq.artemis.quorum.zookeeper.CuratorDistributedPrimitiveManager.PrimitiveId id, CuratorDistributedPrimitiveManager manager)
-
-
Method Detail
-
handleReconnected
protected void handleReconnected()
-
handleLost
protected void handleLost()
-
handleSuspended
protected void handleSuspended()
-
checkUnavailable
protected final void checkUnavailable() throws org.apache.activemq.artemis.quorum.UnavailableStateException- Throws:
org.apache.activemq.artemis.quorum.UnavailableStateException
-
fireUnavailableListener
protected final void fireUnavailableListener(Runnable task)
-
run
protected final <R,T extends Throwable> R run(CuratorDistributedPrimitive.PrimitiveAction<R,T> action) throws T extends Throwable
- Throws:
T extends Throwable
-
tryRun
protected final <R,T extends Throwable> R tryRun(CuratorDistributedPrimitive.InterruptablePrimitiveAction<R,T> action) throws InterruptedException, T extends Throwable
- Throws:
InterruptedExceptionT extends Throwable
-
handleClosed
protected void handleClosed()
-
isUnavailable
protected final boolean isUnavailable()
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable
-
-