public final class RntbdResponse extends Object implements io.netty.util.ReferenceCounted
| Constructor and Description |
|---|
RntbdResponse(UUID activityId,
int statusCode,
Map<String,String> map,
io.netty.buffer.ByteBuf content)
Initializes a new
RntbdResponse instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(io.netty.buffer.ByteBuf out)
Serializes the current
response to the given byte buffer. |
UUID |
getActivityId() |
io.netty.buffer.ByteBuf |
getContent() |
<T> T |
getHeader(RntbdConstants.RntbdResponseHeader header)
|
com.microsoft.azure.cosmosdb.internal.directconnectivity.rntbd.RntbdResponseHeaders |
getHeaders() |
int |
getMessageLength() |
io.netty.handler.codec.http.HttpResponseStatus |
getStatus() |
Long |
getTransportRequestId() |
boolean |
hasPayload()
Returns
true if this response has a payload. |
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1. |
boolean |
release(int decrement)
Decreases the reference count by
decrement and deallocates this response if the count reaches 0. |
RntbdResponse |
retain()
Increases the reference count by
1. |
RntbdResponse |
retain(int increment)
Increases the reference count by the specified
increment. |
String |
toString() |
RntbdResponse |
touch()
Records the current access location of this object for debugging purposes
|
RntbdResponse |
touch(Object hint)
Records the current access location of this object with additional arbitrary information for debugging purposes
|
public RntbdResponse(UUID activityId, int statusCode, Map<String,String> map, io.netty.buffer.ByteBuf content)
RntbdResponse instance.
This method is provided for testing purposes only. It should not be used in product code.
activityId - an activity IDstatusCode - a response status code.map - a collection of response headers.content - a body to be copied to the response.public UUID getActivityId()
public io.netty.buffer.ByteBuf getContent()
public com.microsoft.azure.cosmosdb.internal.directconnectivity.rntbd.RntbdResponseHeaders getHeaders()
public int getMessageLength()
public io.netty.handler.codec.http.HttpResponseStatus getStatus()
public Long getTransportRequestId()
public void encode(io.netty.buffer.ByteBuf out)
response to the given byte buffer.out - the output byte buffer.public <T> T getHeader(RntbdConstants.RntbdResponseHeader header)
public boolean hasPayload()
true if this response has a payload.true if this response has a payload; false otherwise.public int refCnt()
0, it means this object has been deallocated.refCnt in interface io.netty.util.ReferenceCountedpublic boolean release()
1.
The current response is deallocated if the count reaches 0.
release in interface io.netty.util.ReferenceCountedtrue if and only if the reference count became 0 and this response is deallocated.public boolean release(int decrement)
decrement and deallocates this response if the count reaches 0.release in interface io.netty.util.ReferenceCounteddecrement - amount of the decrease.true if and only if the reference count became 0 and this response has been deallocated.public RntbdResponse retain()
1.retain in interface io.netty.util.ReferenceCountedpublic RntbdResponse retain(int increment)
increment.retain in interface io.netty.util.ReferenceCountedincrement - amount of the increasepublic RntbdResponse touch()
If this object is determined to be leaked, the information recorded by this operation will be provided to you via
ResourceLeakDetector. This method is a shortcut to touch(null).
touch in interface io.netty.util.ReferenceCountedpublic RntbdResponse touch(Object hint)
If this object is determined to be leaked, the information recorded by this operation will be provided to you via
ResourceLeakDetector.
touch in interface io.netty.util.ReferenceCountedhint - information useful for debugging (unused)Copyright © 2020. All rights reserved.