Interface RequestResult

All Superinterfaces:
JsonType
All Known Implementing Classes:
AbstractRequestResult, BooleanResult, ClaimSegmentResult, ErrorResult, GetAggregateIdsResult, GetDocumentResult, GetDocumentsResult, GetDocumentStatsResult, GetEventsResult, GetFacetStatsResult, GetPositionResult, GetRelationshipsResult, GetScheduleResult, GetSearchHistogramResult, GetValueResult, ReadFromIndexResult, ReadResult, SearchDocumentsResult, StringResult, VoidResult

public interface RequestResult extends JsonType
Marker interface for responses to Request objects (including commands and queries).

Implementations of this interface are returned by the Fluxzero Runtime and matched to their corresponding Request using the requestId.

A typical RequestResult contains minimal payload and metadata for monitoring, and may override JsonType.toMetric() to avoid logging full results.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    The requestId of the original Request this result corresponds to.
    default long
    The timestamp (in epoch milliseconds) when the Fluxzero Runtime received the original request.
    default long
    The timestamp (in epoch milliseconds) when the Fluxzero Runtime queued this response for websocket delivery.
    default long
    The timestamp (in epoch milliseconds) just before the Fluxzero Runtime encoded and sent this response.
    long
    The timestamp (in epoch milliseconds) when this result was generated.
    default void
    setRequestReceivedTimestamp(long requestReceivedTimestamp)
    Updates the timestamp at which the Fluxzero Runtime received the original request.
    default void
    setResponseQueuedTimestamp(long responseQueuedTimestamp)
    Updates the timestamp at which the Fluxzero Runtime queued this response for websocket delivery.
    default void
    setResponseSendStartTimestamp(long responseSendStartTimestamp)
    Updates the timestamp just before the Fluxzero Runtime encoded and sent this response.

    Methods inherited from interface JsonType

    toMetric
  • Method Details

    • getRequestId

      long getRequestId()
      The requestId of the original Request this result corresponds to.
    • getTimestamp

      long getTimestamp()
      The timestamp (in epoch milliseconds) when this result was generated.
    • getRequestReceivedTimestamp

      default long getRequestReceivedTimestamp()
      The timestamp (in epoch milliseconds) when the Fluxzero Runtime received the original request.

      A value of 0 means the runtime did not provide this timestamp.

    • setRequestReceivedTimestamp

      default void setRequestReceivedTimestamp(long requestReceivedTimestamp)
      Updates the timestamp at which the Fluxzero Runtime received the original request.

      Implementations that do not store this metadata may ignore the update.

    • getResponseQueuedTimestamp

      default long getResponseQueuedTimestamp()
      The timestamp (in epoch milliseconds) when the Fluxzero Runtime queued this response for websocket delivery.

      A value of 0 means the runtime did not provide this timestamp.

    • setResponseQueuedTimestamp

      default void setResponseQueuedTimestamp(long responseQueuedTimestamp)
      Updates the timestamp at which the Fluxzero Runtime queued this response for websocket delivery.
    • getResponseSendStartTimestamp

      default long getResponseSendStartTimestamp()
      The timestamp (in epoch milliseconds) just before the Fluxzero Runtime encoded and sent this response.

      A value of 0 means the runtime did not provide this timestamp.

    • setResponseSendStartTimestamp

      default void setResponseSendStartTimestamp(long responseSendStartTimestamp)
      Updates the timestamp just before the Fluxzero Runtime encoded and sent this response.