public class QueryPacket extends Packet
CODE_MASK, encodedBody, encodingBuffer, length
Modifier and Type | Method and Description |
---|---|
static QueryPacket |
create(Query query)
Creates and returns a query packet
|
void |
encodeBody(ByteBuffer buffer)
Encodes the body of this package onto the given buffer at the current position.
|
int |
getCode()
Returns the code of this package
|
int |
getHits()
Returns the number of hits requested
|
int |
getLastOffset()
Returns the last offset requested (inclusively), that is
getOffset() + getHits()
|
int |
getOffset()
Returns the first offset requested
|
byte[] |
getOpaqueCacheKey()
Returns an opaque cache key for the query represented by this
(pre-serialized) packet.
|
Query |
getQuery()
Returns the query from which this packet is populated
|
QueryPacketData |
getQueryPacketData()
Fetch a binary wrapper containing data from encoding process for use in
creating a summary request.
|
String |
toString() |
decode, encode, getChannel, hasChannelId, patchChannelId, setChannel
allocateAndEncode, codeDecodedHook, decodeAndDecompressBody, decodeBody, encode, encodeAndCompressBody, getLength, getTimestamp, grantEncodingBuffer, grantEncodingBuffer, isEncoded, setCompressionLimit, setCompressionType, setEncodedBody, setTimestamp
public Query getQuery()
public static QueryPacket create(Query query)
query
- the query to convert to a packetpublic int getOffset()
public int getLastOffset()
public int getHits()
public byte[] getOpaqueCacheKey()
public void encodeBody(ByteBuffer buffer)
BasicPacket
encodeBody
in class BasicPacket
public int getCode()
BasicPacket
getCode
in class BasicPacket
public QueryPacketData getQueryPacketData()
IllegalStateException
- if no wrapper has been generatedCopyright © 2018. All rights reserved.