@InterfaceStability.Committed @InterfaceAudience.Public public class MultiResult<OPERATION> extends Object
The result corresponding to an individual LookupCommand
or MutationCommand
. It contains the command’s path and operation for reference.
The value only makes sense for some commands (like Lookup.GET
or Mutation.COUNTER
). If it does make sense, it is represented as an UTF-8 encoded ByteBuf
. It is the responsibility of the caller to consume and ReferenceCounted.release()
this ByteBuf.
Modifier and Type | Method and Description |
---|---|
static MultiResult<Lookup> |
create(short statusCode,
ResponseStatus status,
String path,
Lookup operation,
ByteBuf value) |
static MultiResult<Mutation> |
create(short statusCode,
ResponseStatus status,
String path,
Mutation operation,
ByteBuf value) |
boolean |
equals(Object o) |
int |
hashCode() |
OPERATION |
operation() |
String |
path() |
ResponseStatus |
status()
Returns the individual operation’s status.
|
short |
statusCode() |
String |
toString() |
ByteBuf |
value() |
public static MultiResult<Lookup> create(short statusCode, ResponseStatus status, String path, Lookup operation, ByteBuf value)
public static MultiResult<Mutation> create(short statusCode, ResponseStatus status, String path, Mutation 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
or MutationCommand
, for reference.public OPERATION operation()
Lookup
/Mutation
operation of the original LookupCommand
/MutationCommand
, for reference.public ByteBuf value()
ByteBuf
(that you must consume and ReferenceCounted.release()
). Can be empty in case of error or if the operation doesn’t return a value.Copyright © 2017 Couchbase, Inc.. All rights reserved.