Interface AsyncResponse<T extends AsyncResponse<? extends RefCounted>>

All Superinterfaces:
RefCounted, Writeable
All Known Implementing Classes:
AsyncSearchResponse, StoredAsyncResponse

public interface AsyncResponse<T extends AsyncResponse<? extends RefCounted>> extends Writeable, RefCounted
  • 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