Class AbstractKeyValueResponse
- java.lang.Object
-
- com.couchbase.client.core.message.AbstractCouchbaseResponse
-
- com.couchbase.client.core.message.kv.AbstractKeyValueResponse
-
- All Implemented Interfaces:
CouchbaseMessage
,CouchbaseResponse
,BinaryResponse
,ReferenceCounted
- Direct Known Subclasses:
AppendResponse
,CounterResponse
,FailoverObserveSeqnoResponse
,GetAllMutationTokensResponse
,GetBucketConfigResponse
,GetResponse
,InsertResponse
,KeyValueHandler.KeepAliveResponse
,MultiLookupResponse
,MultiMutationResponse
,NoFailoverObserveSeqnoResponse
,NoopResponse
,ObserveResponse
,PrependResponse
,RemoveResponse
,ReplaceResponse
,SimpleSubdocResponse
,StatResponse
,TouchResponse
,UnlockResponse
,UpsertResponse
public abstract class AbstractKeyValueResponse extends AbstractCouchbaseResponse implements BinaryResponse
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractKeyValueResponse(ResponseStatus status, short serverStatusCode, String bucket, ByteBuf content, CouchbaseRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
bucket()
The name of the bucket where this response is coming from.ByteBuf
content()
Contains the content of the response, potentially null or empty.int
refCnt()
boolean
release()
boolean
release(int decrement)
BinaryResponse
retain()
BinaryResponse
retain(int increment)
long
serverDuration()
Returns the reported server duration, if set.BinaryResponse
serverDuration(long duration)
Sets the server duration.short
serverStatusCode()
String
toString()
BinaryResponse
touch()
BinaryResponse
touch(Object o)
-
Methods inherited from class com.couchbase.client.core.message.AbstractCouchbaseResponse
creationTime, request, status, statusDetails, statusDetails
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.core.message.CouchbaseMessage
creationTime
-
Methods inherited from interface com.couchbase.client.core.message.CouchbaseResponse
request, status, statusDetails, statusDetails
-
-
-
-
Constructor Detail
-
AbstractKeyValueResponse
protected AbstractKeyValueResponse(ResponseStatus status, short serverStatusCode, String bucket, ByteBuf content, CouchbaseRequest request)
-
-
Method Detail
-
content
public ByteBuf content()
Description copied from interface:BinaryResponse
Contains the content of the response, potentially null or empty.- Specified by:
content
in interfaceBinaryResponse
- Returns:
- the content.
-
bucket
public String bucket()
Description copied from interface:BinaryResponse
The name of the bucket where this response is coming from.- Specified by:
bucket
in interfaceBinaryResponse
- Returns:
- the bucket name.
-
serverStatusCode
public short serverStatusCode()
- Specified by:
serverStatusCode
in interfaceBinaryResponse
-
serverDuration
public long serverDuration()
Description copied from interface:BinaryResponse
Returns the reported server duration, if set.- Specified by:
serverDuration
in interfaceBinaryResponse
-
serverDuration
public BinaryResponse serverDuration(long duration)
Description copied from interface:BinaryResponse
Sets the server duration.- Specified by:
serverDuration
in interfaceBinaryResponse
- Parameters:
duration
- the duration to set.
-
refCnt
public int refCnt()
- Specified by:
refCnt
in interfaceReferenceCounted
-
retain
public BinaryResponse retain()
- Specified by:
retain
in interfaceReferenceCounted
-
retain
public BinaryResponse retain(int increment)
- Specified by:
retain
in interfaceReferenceCounted
-
touch
public BinaryResponse touch()
- Specified by:
touch
in interfaceReferenceCounted
-
touch
public BinaryResponse touch(Object o)
- Specified by:
touch
in interfaceReferenceCounted
-
release
public boolean release()
- Specified by:
release
in interfaceReferenceCounted
-
release
public boolean release(int decrement)
- Specified by:
release
in interfaceReferenceCounted
-
toString
public String toString()
- Overrides:
toString
in classAbstractCouchbaseResponse
-
-