public class QueryResultPacket extends Packet
Modifier and Type | Field and Description |
---|---|
private long |
activeDocs |
private int |
code
This may have code 202, 208, 214 or 217 of historical reasons
|
private long |
coverageDocs |
private boolean |
coverageNodes
Whether coverage information is included in this result
|
private int |
degradedReason |
private int |
docstamp |
private List<DocumentInfo> |
documents |
private byte[] |
groupData |
private boolean |
groupDataFeature
Whether the result contains grouping results
|
private Number |
maxRank |
private boolean |
mldFeature
Whether mld stuff, whatever that is, is included in this result
|
private short |
nodesQueried |
private short |
nodesReplied |
private int |
offset |
FS4Properties[] |
propsArray |
private boolean |
propsFeature
Whether the result contains properties
|
static int |
QRF_COVERAGE_NODES |
static int |
QRF_GROUPDATA |
static int |
QRF_MLD
feature bits
|
static int |
QRF_PROPERTIES |
static int |
QRF_SORTDATA |
static int |
QRF_UNUSED_1 |
static int |
QRF_UNUSED_2 |
private long |
soonActiveDocs |
private long |
totalDocumentCount |
channel, CHANNEL_ID_OFFSET
CODE_MASK, encodedBody, encodingBuffer, length
Modifier | Constructor and Description |
---|---|
private |
QueryResultPacket() |
Modifier and Type | Method and Description |
---|---|
void |
addDocument(DocumentInfo document) |
protected void |
codeDecodedHook(int code)
Called when the packet code is decoded.
|
static QueryResultPacket |
create() |
void |
decodeBody(ByteBuffer buffer)
Decodes the body of this package from a byte buffer
positioned at the first byte of the package.
|
private void |
decodeDocuments(ByteBuffer buffer,
int documentCount) |
private void |
decodeFeatures(IntBuffer buffer)
Sets the features of this package.
|
private Number |
decodeMaxRank(ByteBuffer buffer) |
long |
getActiveDocs() |
int |
getCode()
Returns the code of this package
|
long |
getCoverageDocs() |
boolean |
getCoverageFeature() |
boolean |
getCoverageFull() |
int |
getDegradedReason() |
int |
getDocstamp() |
int |
getDocumentCount() |
List<DocumentInfo> |
getDocuments()
Returns a read-only list containing the DocumentInfo objects of this result
|
byte[] |
getGroupData()
Returns the opaque grouping results
|
int |
getMaxRank() |
boolean |
getMldFeature()
Returns whether this has the mysterious mld feature
|
short |
getNodesQueried() |
short |
getNodesReplied() |
int |
getOffset() |
long |
getSoonActiveDocs() |
long |
getTotalDocumentCount()
Returns the total number of documents avalable for this query
|
void |
setDocstamp(int docstamp) |
void |
setOffset(int offset)
Only for testing.
|
void |
setTotalDocumentCount(long totalDocumentCount)
Only for testing.
|
String |
toString() |
decode, encode, getChannel, hasChannelId, patchChannelId, setChannel
allocateAndEncode, decodeAndDecompressBody, encode, encodeAndCompressBody, encodeBody, getLength, getTimestamp, grantEncodingBuffer, grantEncodingBuffer, isEncoded, setCompressionLimit, setCompressionType, setEncodedBody, setTimestamp
private int code
private boolean mldFeature
private boolean coverageNodes
private long coverageDocs
private long activeDocs
private long soonActiveDocs
private int degradedReason
private short nodesQueried
private short nodesReplied
private boolean groupDataFeature
private boolean propsFeature
private long totalDocumentCount
private Number maxRank
private int docstamp
private byte[] groupData
private List<DocumentInfo> documents
public FS4Properties[] propsArray
private int offset
public static final int QRF_MLD
public static final int QRF_COVERAGE_NODES
public static final int QRF_SORTDATA
public static final int QRF_UNUSED_1
public static final int QRF_UNUSED_2
public static final int QRF_GROUPDATA
public static final int QRF_PROPERTIES
public static QueryResultPacket create()
public void setDocstamp(int docstamp)
public int getDocstamp()
public boolean getMldFeature()
public boolean getCoverageFeature()
public long getCoverageDocs()
public long getActiveDocs()
public long getSoonActiveDocs()
public int getDegradedReason()
public boolean getCoverageFull()
public int getOffset()
public void setOffset(int offset)
public void decodeBody(ByteBuffer buffer)
BasicPacket
decodeBody
in class BasicPacket
private Number decodeMaxRank(ByteBuffer buffer)
private void decodeFeatures(IntBuffer buffer)
private void decodeDocuments(ByteBuffer buffer, int documentCount)
public int getCode()
BasicPacket
getCode
in class BasicPacket
protected void codeDecodedHook(int code)
BasicPacket
codeDecodedHook
in class BasicPacket
public int getDocumentCount()
public byte[] getGroupData()
public long getTotalDocumentCount()
public void setTotalDocumentCount(long totalDocumentCount)
public List<DocumentInfo> getDocuments()
public void addDocument(DocumentInfo document)
public int getMaxRank()
public short getNodesQueried()
public short getNodesReplied()
Copyright © 2018. All rights reserved.