Class NodeListenerFuture<T>

  • All Implemented Interfaces:
    java.util.concurrent.Future<T>, FRListener<T>, NodeListener<T>

    public abstract class NodeListenerFuture<T>
    extends java.lang.Object
    implements NodeListener<T>, java.util.concurrent.Future<T>
    • Constructor Detail

      • NodeListenerFuture

        public NodeListenerFuture()
    • Method Detail

      • cancel

        public boolean cancel​(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<T>
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface java.util.concurrent.Future<T>
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface java.util.concurrent.Future<T>
      • get

        public T get()
              throws java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException
        Specified by:
        get in interface java.util.concurrent.Future<T>
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • get

        public T get​(long timeout,
                     java.util.concurrent.TimeUnit unit)
              throws java.util.concurrent.ExecutionException,
                     java.lang.InterruptedException
        Specified by:
        get in interface java.util.concurrent.Future<T>
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • onSuccess

        public void onSuccess​(T token)
        Description copied from interface: FRListener
        Called when an asynchronous call completes successfully.
        Specified by:
        onSuccess in interface FRListener<T>
        Parameters:
        token - the value returned
      • onException

        public void onException​(java.lang.Exception e)
        Description copied from interface: FRListener
        Called when an asynchronous call fails to complete.
        Specified by:
        onException in interface FRListener<T>
        Parameters:
        e - the reason for failure
      • reset

        public void reset()