Package com.yahoo.vespa.http.client
Class Result
- java.lang.Object
-
- com.yahoo.vespa.http.client.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(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 anyjava.util.List<Result.Detail>
getDetails()
java.lang.CharSequence
getDocumentDataAsCharSequence()
Returns the document datajava.lang.String
getDocumentId()
Returns the document id that this result is forjava.lang.String
getOperationId()
Returns the id of the operation this is the result ofboolean
hasLocalTrace()
Returns whether the operation has been set up with local tracingboolean
isSuccess()
Returns true if the operation(s) was successful.java.lang.String
toString()
-
-
-
Constructor Detail
-
Result
public Result(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 oneResult.Detail
ingetDetails()
is unsuccessful, this will return false.
-
getDetails
public java.util.List<Result.Detail> getDetails()
-
hasLocalTrace
public boolean hasLocalTrace()
Returns whether the operation has been set up with local tracing
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-