Module org.elasticsearch.xcore
Interface AsyncResponse<T extends AsyncResponse<? extends org.elasticsearch.core.RefCounted>>
- All Superinterfaces:
org.elasticsearch.core.RefCounted,Writeable
- All Known Implementing Classes:
AsyncSearchResponse,StoredAsyncResponse
public interface AsyncResponse<T extends AsyncResponse<? extends org.elasticsearch.core.RefCounted>>
extends Writeable, org.elasticsearch.core.RefCounted
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Method Summary
Modifier and TypeMethodDescriptiondefault TConvert this AsyncResponse to a new AsyncResponse with a given failurelongWhen this response will expire as a timestamp in milliseconds since epoch.withExpirationTime(long expirationTimeMillis) Returns a copy of this object with a new expiration timeMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRef
-
Method Details
-
getExpirationTime
long getExpirationTime()When this response will expire as a timestamp in milliseconds since epoch. -
withExpirationTime
Returns a copy of this object with a new expiration time -
convertToFailure
Convert this AsyncResponse to a new AsyncResponse with a given failure- Returns:
- a new AsyncResponse that stores a failure with a provided exception
-