Module org.elasticsearch.server
Package org.elasticsearch.action.support
Class UnsafePlainActionFuture<T>
java.lang.Object
org.elasticsearch.action.support.PlainActionFuture<T>
org.elasticsearch.action.support.UnsafePlainActionFuture<T>
- All Implemented Interfaces:
Future<T>
,ActionFuture<T>
,ActionListener<T>
Deprecated, for removal: This API element is subject to removal in a future version.
An unsafe future. You should not need to use this for new code, rather you should be able to convert that code to be async
or use a clear hierarchy of thread pool executors around the future.
This future is unsafe, since it allows notifying the future on the same thread pool executor that it is being waited on. This is a common deadlock scenario, since all threads may be waiting and thus no thread may be able to complete the future.
Note that the deadlock protection in PlainActionFuture
is very weak. In general there's a risk of deadlock if there's any cycle
of threads which block/complete on each other's futures, or dispatch work to each other, but this is much harder to detect.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorsConstructorDescriptionUnsafePlainActionFuture
(String... unsafeExecutors) Deprecated, for removal: This API element is subject to removal in a future version.Create a future which permits any of the given named executors to be used unsafely (i.e. -
Method Summary
Methods inherited from class org.elasticsearch.action.support.PlainActionFuture
actionGet, actionGet, actionGet, blockingAllowed, cancel, done, get, get, isCancelled, isDone, onFailure, onResponse, result, set
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.action.ActionListener
delegateFailure, delegateFailureAndWrap, delegateFailureIgnoreResponseAndWrap, delegateResponse, map, safeMap
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
UnsafePlainActionFuture
Deprecated, for removal: This API element is subject to removal in a future version.Create a future which permits any of the given named executors to be used unsafely (i.e. used for both waiting for the future's completion and completing the future).
-