Class SRUExplainResponse


  • public final class SRUExplainResponse
    extends Object
    A response to a explain request.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      List<SRUDiagnostic> getDiagnostics()
      Get the diagnostics for this response.
      int getDiagnosticsCount()
      Get the number of diagnostics in the response.
      List<SRUExtraResponseData> getExtraResponseData()
      Get the extra response data for this result.
      <V extends SRUExtraResponseData>
      List<V>
      getExtraResponseData​(Class<V> clazz)
      Get the extra response data of a specific class for this result.
      int getExtraResponseDataCount()
      Return the number of extra response data records attached to the response.
      <V extends SRUExtraResponseData>
      V
      getFirstExtraResponseData​(Class<V> clazz)
      Get the first instance of extra response data of a specific class for this result.
      SRURecord getRecord()
      Get the explain record.
      T getRequest()
      Get the request that produced this response.
      long getTimeNetwork()
      Get the number of milliseconds this request spend waiting for network operations to finish.
      long getTimeProcessing()
      Get the number of milliseconds the client was busy processing the results sent from the endpoint.
      long getTimeTotal()
      Get the total number of milliseconds elapsed for this request.
      long getTimeWait()
      Get the number of milliseconds this request has been queued before it was processed by the client.
      long getTotalBytesTransferred()
      Get the total number of bytes transferred for this request.
      boolean hasDiagnostics()
      Check, if the response contains any diagnostics.
      boolean hasExtraResponseData()
      Check, if this response has any extra response data attached to the response.
      <V extends SRUExtraResponseData>
      boolean
      hasExtraResponseData​(Class<V> clazz)
      Check, if this response has any extra response data of a specific class attached to it.
      boolean hasRecord()
      Check, if response contains a record.
    • Method Detail

      • getRecord

        public SRURecord getRecord()
        Get the explain record.
        Returns:
        the explain record or null
      • hasRecord

        public boolean hasRecord()
        Check, if response contains a record.
        Returns:
        true of response contains a record, false otherwise
      • getRequest

        public T getRequest()
        Get the request that produced this response.
        Returns:
        the request
      • getDiagnostics

        public List<SRUDiagnostic> getDiagnostics()
        Get the diagnostics for this response.
        Returns:
        diagnostics for this response or null if none
      • hasDiagnostics

        public boolean hasDiagnostics()
        Check, if the response contains any diagnostics.

        NB: Surrogate diagnostics are not covered by this.

        Returns:
        true if response contains any diagnostic, false otherwise
      • getDiagnosticsCount

        public int getDiagnosticsCount()
        Get the number of diagnostics in the response.

        NB: Surrogate diagnostics are not covered by this.

        Returns:
        the number of diagnostics or 0 is none
      • getExtraResponseData

        public List<SRUExtraResponseData> getExtraResponseData()
        Get the extra response data for this result.
        Returns:
        get a list of SRUExtraResponseData instances for the extra response data from the SRU response or null if none are available
      • hasExtraResponseData

        public boolean hasExtraResponseData()
        Check, if this response has any extra response data attached to the response.
        Returns:
        true if extra response is attached, false otherwise
      • getExtraResponseDataCount

        public int getExtraResponseDataCount()
        Return the number of extra response data records attached to the response.
        Returns:
        the number of records, or 0 is none
      • getExtraResponseData

        public <V extends SRUExtraResponseDataList<V> getExtraResponseData​(Class<V> clazz)
        Get the extra response data of a specific class for this result.
        Type Parameters:
        V - the type of SRUExtraResponseData to check for
        Parameters:
        clazz - the specific class to check for
        Returns:
        a list of SRUExtraResponseData instances for the extra response data from the SRU response or null if none are available
      • getFirstExtraResponseData

        public <V extends SRUExtraResponseData> V getFirstExtraResponseData​(Class<V> clazz)
        Get the first instance of extra response data of a specific class for this result.
        Type Parameters:
        V - the type of SRUExtraResponseData to check for
        Parameters:
        clazz - the specific class to check for
        Returns:
        a list of SRUExtraResponseData instances for the extra response data from the SRU response or null if none are available
      • hasExtraResponseData

        public <V extends SRUExtraResponseData> boolean hasExtraResponseData​(Class<V> clazz)
        Check, if this response has any extra response data of a specific class attached to it.
        Type Parameters:
        V - the type of SRUExtraResponseData to check for
        Parameters:
        clazz - the specific class to check for
        Returns:
        true if extra response is attached, false otherwise
      • getTotalBytesTransferred

        public long getTotalBytesTransferred()
        Get the total number of bytes transferred for this request.
        Returns:
        the total number of bytes or -1 if not available
      • getTimeTotal

        public long getTimeTotal()
        Get the total number of milliseconds elapsed for this request.
        Returns:
        the total number of milliseconds or -1 if not available
      • getTimeWait

        public long getTimeWait()
        Get the number of milliseconds this request has been queued before it was processed by the client.
        Returns:
        the number of milliseconds queued or -1 if not available
      • getTimeNetwork

        public long getTimeNetwork()
        Get the number of milliseconds this request spend waiting for network operations to finish.
        Returns:
        the number of milliseconds spend in waiting on network or -1 if not available
      • getTimeProcessing

        public long getTimeProcessing()
        Get the number of milliseconds the client was busy processing the results sent from the endpoint.
        Returns:
        the number of milliseconds spend in processing or -1 if not available