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 Type
    Method
    Description
    default T
    Convert this AsyncResponse to a new AsyncResponse with a given failure
    long
    When this response will expire as a timestamp in milliseconds since epoch.
    withExpirationTime(long expirationTimeMillis)
    Returns a copy of this object with a new expiration time

    Methods inherited from interface org.elasticsearch.core.RefCounted

    decRef, hasReferences, incRef, mustIncRef, tryIncRef

    Methods inherited from interface org.elasticsearch.common.io.stream.Writeable

    writeTo
  • Method Details

    • getExpirationTime

      long getExpirationTime()
      When this response will expire as a timestamp in milliseconds since epoch.
    • withExpirationTime

      T withExpirationTime(long expirationTimeMillis)
      Returns a copy of this object with a new expiration time
    • convertToFailure

      default T convertToFailure(Exception exc)
      Convert this AsyncResponse to a new AsyncResponse with a given failure
      Returns:
      a new AsyncResponse that stores a failure with a provided exception