Class Result


  • public class Result
    extends java.lang.Object
    The result of a stream operation. A Result refers to a single document, but may contain more than one Result.Detail instances, as these pertains to a single endpoint, and a Result may wrap data for multiple endpoints.
    Author:
    Einar M R Rosenvinge
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Result.Detail
      Information in a Result for a single operation sent to a single endpoint.
      static class  Result.ResultType  
    • Constructor Summary

      Constructors 
      Constructor Description
      Result​(com.yahoo.vespa.http.client.core.Document document, java.util.Collection<Result.Detail> values, java.lang.StringBuilder localTrace)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getContext()
      Returns the context of the object if any
      java.util.List<Result.Detail> getDetails()  
      java.lang.CharSequence getDocumentDataAsCharSequence()
      Returns the document data
      java.lang.String getDocumentId()
      Returns the document id that this result is for
      java.lang.String getOperationId()
      Returns the id of the operation this is the result of
      boolean hasLocalTrace()
      Checks if operation has been set up with local tracing.
      boolean isSuccess()
      Returns true if the operation(s) was successful.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Result

        public Result​(com.yahoo.vespa.http.client.core.Document document,
                      java.util.Collection<Result.Detail> values,
                      java.lang.StringBuilder localTrace)
    • Method Detail

      • getDocumentId

        public java.lang.String getDocumentId()
        Returns the document id that this result is for
      • getOperationId

        public java.lang.String getOperationId()
        Returns the id of the operation this is the result of
      • getDocumentDataAsCharSequence

        public java.lang.CharSequence getDocumentDataAsCharSequence()
        Returns the document data
      • getContext

        public java.lang.Object getContext()
        Returns the context of the object if any
      • isSuccess

        public boolean isSuccess()
        Returns true if the operation(s) was successful. If at least one Result.Detail in getDetails() is unsuccessful, this will return false.
      • hasLocalTrace

        public boolean hasLocalTrace()
        Checks if operation has been set up with local tracing.
        Returns:
        true if operation has local trace.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object