Package zipkin2

Class Call.Base<V>

  • All Implemented Interfaces:
    java.lang.Cloneable
    Enclosing class:
    Call<V>

    public abstract static class Call.Base<V>
    extends Call<V>
    • Constructor Detail

      • Base

        protected Base()
    • Method Detail

      • execute

        public final V execute()
                        throws java.io.IOException
        Description copied from class: Call
        Invokes a request, returning a success value or propagating an error to the caller. Invoking this more than once will result in an error. To repeat a call, make a copy with Call.clone().

        Eventhough this is a blocking call, implementations may honor calls to Call.cancel() from a different thread.

        Specified by:
        execute in class Call<V>
        Returns:
        a success value. Null is unexpected, except when V is Void.
        Throws:
        java.io.IOException
      • doExecute

        protected abstract V doExecute()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • enqueue

        public final void enqueue​(Callback<V> callback)
        Description copied from class: Call
        Invokes a request asynchronously, signaling the callback when complete. Invoking this more than once will result in an error. To repeat a call, make a copy with Call.clone().
        Specified by:
        enqueue in class Call<V>
      • doEnqueue

        protected abstract void doEnqueue​(Callback<V> callback)
      • cancel

        public final void cancel()
        Description copied from class: Call
        Requests to cancel this call, even if some implementations may not support it. For example, a blocking call is sometimes not cancelable.
        Specified by:
        cancel in class Call<V>
      • doCancel

        protected void doCancel()
      • isCanceled

        public final boolean isCanceled()
        Description copied from class: Call
        Returns true if Call.cancel() was called.

        Calls can fail before being canceled, so true does always mean cancelation caused a call to fail. That said, successful cancellation does result in a failure.

        Specified by:
        isCanceled in class Call<V>
      • doIsCanceled

        protected boolean doIsCanceled()