Class AbstractRequest<V>
- java.lang.Object
-
- org.eclipse.xtext.ide.server.concurrent.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.RequestCancelIndicatorcancelIndicatorThe current cancel indicator.protected RequestManagerrequestManagerThe request manager that is handling this request.protected org.eclipse.xtext.ide.server.concurrent.AbstractRequest.ResultFutureresultThe underlying future.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRequest(RequestManager requestManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcancel()Attempt to cancel.protected voidcancel(boolean mayInterruptIfRunning)protected voidcancelResult(boolean mayInterruptIfRunning)protected voidcomplete(V value)java.util.concurrent.CompletableFuture<V>get()Return the underlying future.protected abstract org.apache.log4j.LoggergetLogger()protected booleanisDone()protected voidlogAndCompleteExceptionally(java.lang.Throwable t)
-
-
-
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:CancellableAttempt to cancel.- Specified by:
cancelin interfaceCancellable
-
get
public java.util.concurrent.CompletableFuture<V> get()
Return the underlying future.
-
-