Class CuratorDistributedPrimitive
- java.lang.Object
-
- org.apache.activemq.artemis.quorum.zookeeper.CuratorDistributedPrimitive
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public abstract class CuratorDistributedPrimitive extends java.lang.Object implements java.lang.AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceCuratorDistributedPrimitive.InterruptablePrimitiveAction<R,T extends java.lang.Throwable>protected static interfaceCuratorDistributedPrimitive.PrimitiveAction<R,T extends java.lang.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(java.lang.Runnable task)protected voidhandleClosed()protected voidhandleLost()protected voidhandleReconnected()protected voidhandleSuspended()protected booleanisUnavailable()protected <R,T extends java.lang.Throwable>
Rrun(CuratorDistributedPrimitive.PrimitiveAction<R,T> action)protected <R,T extends java.lang.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(java.lang.Runnable task)
-
run
protected final <R,T extends java.lang.Throwable> R run(CuratorDistributedPrimitive.PrimitiveAction<R,T> action) throws T extends java.lang.Throwable
- Throws:
T extends java.lang.Throwable
-
tryRun
protected final <R,T extends java.lang.Throwable> R tryRun(CuratorDistributedPrimitive.InterruptablePrimitiveAction<R,T> action) throws java.lang.InterruptedException, T extends java.lang.Throwable
- Throws:
java.lang.InterruptedExceptionT extends java.lang.Throwable
-
handleClosed
protected void handleClosed()
-
isUnavailable
protected final boolean isUnavailable()
-
close
public final void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-