@InterfaceStability.Experimental @InterfaceAudience.Public public class LookupResult extends Object
The result corresponding to an individual LookupCommand
. It contains the command’s path and operation for reference.
The value only makes sense for Lookup.GET
commands. If it could be found, it is represented as an UTF-8 encoded ByteBuf
. It is the responsibility of the caller to consume and ReferenceCounted.release()
this ByteBuf.
Constructor and Description |
---|
LookupResult(short statusCode,
ResponseStatus status,
String path,
Lookup operation,
ByteBuf value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
Lookup |
operation() |
String |
path() |
ResponseStatus |
status()
Returns the individual operation’s status.
|
short |
statusCode() |
String |
toString() |
ByteBuf |
value() |
public LookupResult(short statusCode, ResponseStatus status, String path, Lookup operation, ByteBuf value)
public short statusCode()
public ResponseStatus status()
Returns the individual operation’s status.
Note that the containing MultiLookupResponse
status can only be ResponseStatus.SUCCESS
if all individual LookupResults are a SUCCESS too.
A Lookup.EXIST
can either be a SUCCESS if the value exist or a ResponseStatus.SUBDOC_PATH_NOT_FOUND
if not.
public String path()
LookupCommand
, for reference.public Lookup operation()
Lookup
operation of the original LookupCommand
, for reference.public ByteBuf value()
ByteBuf
(that you must consume and ReferenceCounted.release()
). Can be empty in case of error or if the operation is EXIST.Copyright © 2016 Couchbase, Inc.. All rights reserved.