Class SRUSearchRetrieveResponse


  • public final class SRUSearchRetrieveResponse
    extends Object
    A response to a searchRetrieve 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.
      int getNextRecordPosition()
      Get the next record position.
      int getNumberOfRecords()
      Get the number of records.
      List<SRURecord> getRecords()
      Get the list of records.
      int getRecordsCount()
      Get the number of records returned by the request.
      T getRequest()
      Get the request that produced this response.
      String getResultSetId()
      Get the result set id.
      int getResultSetIdleTime()
      Get the result set idle time.
      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 hasRecords()
      Check, if response contains any records.
    • Method Detail

      • getNumberOfRecords

        public int getNumberOfRecords()
        Get the number of records.
        Returns:
        the number of records or -1 if not available
      • getResultSetId

        public String getResultSetId()
        Get the result set id.
        Returns:
        the result set id or -1 if not available
      • getResultSetIdleTime

        public int getResultSetIdleTime()
        Get the result set idle time.
        Returns:
        the result set idle time or -1 if not available
      • getRecords

        public List<SRURecord> getRecords()
        Get the list of records.
        Returns:
        the list of records or null if none
      • hasRecords

        public boolean hasRecords()
        Check, if response contains any records.
        Returns:
        true of response contains records, false otherwise
      • getRecordsCount

        public int getRecordsCount()
        Get the number of records returned by the request.
        Returns:
        number of records or 0 if none
      • getNextRecordPosition

        public int getNextRecordPosition()
        Get the next record position.
        Returns:
        the next record position or -1 if not available
      • 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