Class AsyncResultImpl<T>

java.lang.Object
org.apache.curator.x.async.details.AsyncResultImpl<T>
All Implemented Interfaces:
AsyncResult<T>

public class AsyncResultImpl<T> extends Object implements AsyncResult<T>
  • Constructor Details

    • AsyncResultImpl

      public AsyncResultImpl()
    • AsyncResultImpl

      public AsyncResultImpl(org.apache.zookeeper.KeeperException.Code code)
    • AsyncResultImpl

      public AsyncResultImpl(T value)
    • AsyncResultImpl

      public AsyncResultImpl(Throwable exception)
  • Method Details

    • getRawValue

      public T getRawValue()
      Description copied from interface: AsyncResult
      Returns the raw result of the ZooKeeper method or null
      Specified by:
      getRawValue in interface AsyncResult<T>
      Returns:
      result or null
    • getValue

      public Optional<T> getValue()
      Description copied from interface: AsyncResult
      An optional wrapper around the ZooKeeper method result
      Specified by:
      getValue in interface AsyncResult<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 exception KeeperException.Code.SYSTEMERROR is returned.
      Specified by:
      getCode in interface AsyncResult<T>
      Returns:
      result code
    • getRawException

      public Throwable getRawException()
      Description copied from interface: AsyncResult
      Return any general exception or null
      Specified by:
      getRawException in interface AsyncResult<T>
      Returns:
      exception or null
    • getException

      public Optional<Throwable> getException()
      Description copied from interface: AsyncResult
      An optional wrapper around any general exception
      Specified by:
      getException in interface AsyncResult<T>
      Returns:
      wrapped exception
    • checkException

      public void checkException()
      Description copied from interface: AsyncResult
      If there was a general exception (but not a KeeperException) a RuntimeException is thrown that wraps the exception. Otherwise, the method returns without any action being performed.
      Specified by:
      checkException in interface AsyncResult<T>
    • checkError

      public void checkError()
      Description copied from interface: AsyncResult
      If there was a general exception or a KeeperException a RuntimeException is thrown that wraps the exception. Otherwise, the method returns without any action being performed.
      Specified by:
      checkError in interface AsyncResult<T>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object