Class AsyncResultImpl<T>
java.lang.Object
org.apache.curator.x.async.details.AsyncResultImpl<T>
- All Implemented Interfaces:
AsyncResult<T>
-
Constructor Summary
ConstructorDescriptionAsyncResultImpl
(Throwable exception) AsyncResultImpl
(org.apache.zookeeper.KeeperException.Code code) AsyncResultImpl
(T value) -
Method Summary
Modifier and TypeMethodDescriptionvoid
If there was a general exception or aKeeperException
aRuntimeException
is thrown that wraps the exception.void
If there was a general exception (but not aKeeperException
) aRuntimeException
is thrown that wraps the exception.boolean
org.apache.zookeeper.KeeperException.Code
getCode()
Return the ZooKeeper result code.An optional wrapper around any general exceptionReturn any general exception ornull
Returns the raw result of the ZooKeeper method ornull
getValue()
An optional wrapper around the ZooKeeper method resultint
hashCode()
toString()
-
Constructor Details
-
AsyncResultImpl
public AsyncResultImpl() -
AsyncResultImpl
public AsyncResultImpl(org.apache.zookeeper.KeeperException.Code code) -
AsyncResultImpl
-
AsyncResultImpl
-
-
Method Details
-
getRawValue
Description copied from interface:AsyncResult
Returns the raw result of the ZooKeeper method ornull
- Specified by:
getRawValue
in interfaceAsyncResult<T>
- Returns:
- result or
null
-
getValue
Description copied from interface:AsyncResult
An optional wrapper around the ZooKeeper method result- Specified by:
getValue
in interfaceAsyncResult<T>
- Returns:
- wrapped result
-
getCode
public org.apache.zookeeper.KeeperException.Code getCode()Description copied from interface:AsyncResult
Return the ZooKeeper result code. If the method was successful,KeeperException.Code.OK
is returned. If there was a general exceptionKeeperException.Code.SYSTEMERROR
is returned.- Specified by:
getCode
in interfaceAsyncResult<T>
- Returns:
- result code
-
getRawException
Description copied from interface:AsyncResult
Return any general exception ornull
- Specified by:
getRawException
in interfaceAsyncResult<T>
- Returns:
- exception or
null
-
getException
Description copied from interface:AsyncResult
An optional wrapper around any general exception- Specified by:
getException
in interfaceAsyncResult<T>
- Returns:
- wrapped exception
-
checkException
public void checkException()Description copied from interface:AsyncResult
If there was a general exception (but not aKeeperException
) aRuntimeException
is thrown that wraps the exception. Otherwise, the method returns without any action being performed.- Specified by:
checkException
in interfaceAsyncResult<T>
-
checkError
public void checkError()Description copied from interface:AsyncResult
If there was a general exception or aKeeperException
aRuntimeException
is thrown that wraps the exception. Otherwise, the method returns without any action being performed.- Specified by:
checkError
in interfaceAsyncResult<T>
-
equals
-
hashCode
public int hashCode() -
toString
-