Class AsyncResultImpl<T>
java.lang.Object
org.apache.curator.x.async.details.AsyncResultImpl<T>
- All Implemented Interfaces:
AsyncResult<T>
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncResultImpl(Throwable exception) AsyncResultImpl(org.apache.zookeeper.KeeperException.Code code) AsyncResultImpl(T value) -
Method Summary
Modifier and TypeMethodDescriptionvoidIf there was a general exception or aKeeperExceptionaRuntimeExceptionis thrown that wraps the exception.voidIf there was a general exception (but not aKeeperException) aRuntimeExceptionis thrown that wraps the exception.booleanorg.apache.zookeeper.KeeperException.CodegetCode()Return the ZooKeeper result code.An optional wrapper around any general exceptionReturn any general exception ornullReturns the raw result of the ZooKeeper method ornullgetValue()An optional wrapper around the ZooKeeper method resultinthashCode()toString()
-
Constructor Details
-
AsyncResultImpl
public AsyncResultImpl() -
AsyncResultImpl
public AsyncResultImpl(org.apache.zookeeper.KeeperException.Code code) -
AsyncResultImpl
-
AsyncResultImpl
-
-
Method Details
-
getRawValue
Description copied from interface:AsyncResultReturns the raw result of the ZooKeeper method ornull- Specified by:
getRawValuein interfaceAsyncResult<T>- Returns:
- result or
null
-
getValue
Description copied from interface:AsyncResultAn optional wrapper around the ZooKeeper method result- Specified by:
getValuein interfaceAsyncResult<T>- Returns:
- wrapped result
-
getCode
public org.apache.zookeeper.KeeperException.Code getCode()Description copied from interface:AsyncResultReturn the ZooKeeper result code. If the method was successful,KeeperException.Code.OKis returned. If there was a general exceptionKeeperException.Code.SYSTEMERRORis returned.- Specified by:
getCodein interfaceAsyncResult<T>- Returns:
- result code
-
getRawException
Description copied from interface:AsyncResultReturn any general exception ornull- Specified by:
getRawExceptionin interfaceAsyncResult<T>- Returns:
- exception or
null
-
getException
Description copied from interface:AsyncResultAn optional wrapper around any general exception- Specified by:
getExceptionin interfaceAsyncResult<T>- Returns:
- wrapped exception
-
checkException
public void checkException()Description copied from interface:AsyncResultIf there was a general exception (but not aKeeperException) aRuntimeExceptionis thrown that wraps the exception. Otherwise, the method returns without any action being performed.- Specified by:
checkExceptionin interfaceAsyncResult<T>
-
checkError
public void checkError()Description copied from interface:AsyncResultIf there was a general exception or aKeeperExceptionaRuntimeExceptionis thrown that wraps the exception. Otherwise, the method returns without any action being performed.- Specified by:
checkErrorin interfaceAsyncResult<T>
-
equals
-
hashCode
public int hashCode() -
toString
-