Class AbstractRequest<V>

  • All Implemented Interfaces:
    java.lang.Runnable, Cancellable
    Direct Known Subclasses:
    ReadRequest, WriteRequest

    public abstract class AbstractRequest<V>
    extends java.lang.Object
    implements java.lang.Runnable, Cancellable
    Abstract base type for read and write requests.
    Since:
    2.11
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.xtext.ide.server.concurrent.RequestCancelIndicator cancelIndicator
      The current cancel indicator.
      protected RequestManager requestManager
      The request manager that is handling this request.
      protected org.eclipse.xtext.ide.server.concurrent.AbstractRequest.ResultFuture result
      The underlying future.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      Attempt to cancel.
      protected void cancel​(boolean mayInterruptIfRunning)  
      protected void cancelResult​(boolean mayInterruptIfRunning)  
      protected void complete​(V value)  
      java.util.concurrent.CompletableFuture<V> get()
      Return the underlying future.
      protected abstract org.apache.log4j.Logger getLogger()  
      protected boolean isDone()  
      protected void logAndCompleteExceptionally​(java.lang.Throwable t)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Runnable

        run
    • Field Detail

      • result

        protected final org.eclipse.xtext.ide.server.concurrent.AbstractRequest.ResultFuture result
        The underlying future.
      • cancelIndicator

        protected final org.eclipse.xtext.ide.server.concurrent.RequestCancelIndicator cancelIndicator
        The current cancel indicator.
      • requestManager

        protected final RequestManager requestManager
        The request manager that is handling this request.
    • Constructor Detail

      • AbstractRequest

        protected AbstractRequest​(RequestManager requestManager)
    • Method Detail

      • cancelResult

        protected void cancelResult​(boolean mayInterruptIfRunning)
      • isDone

        protected boolean isDone()
      • complete

        protected void complete​(V value)
      • getLogger

        protected abstract org.apache.log4j.Logger getLogger()
      • logAndCompleteExceptionally

        protected void logAndCompleteExceptionally​(java.lang.Throwable t)
      • cancel

        protected void cancel​(boolean mayInterruptIfRunning)
      • cancel

        public final void cancel()
        Description copied from interface: Cancellable
        Attempt to cancel.
        Specified by:
        cancel in interface Cancellable
      • get

        public java.util.concurrent.CompletableFuture<V> get()
        Return the underlying future.