Package org.elasticsearch.client
Class Cancellable
- java.lang.Object
-
- org.elasticsearch.client.Cancellable
-
public class Cancellable extends java.lang.Object
Represents an operation that can be cancelled. Returned when executing async requests throughRestClient.performRequestAsync(Request, ResponseListener)
, so that the request can be cancelled if needed. Cancelling a request will result in callingAbstractExecutionAwareRequest.abort()
on the underlying request object, which will in turn cancel its correspondingFuture
. Note that cancelling a request does not automatically translate to aborting its execution on the server side, which needs to be specifically implemented in each API.
-
-
Method Summary
Modifier and Type Method Description void
cancel()
Cancels the on-going request that is associated with the current instance ofCancellable
.
-
-
-
Method Detail
-
cancel
public void cancel()
Cancels the on-going request that is associated with the current instance ofCancellable
.
-
-