Modifier and Type | Class and Description |
---|---|
private static class |
PacketWrapper.ResultPacketComparator<T extends BasicPacket> |
Modifier and Type | Field and Description |
---|---|
private Optional<Integer> |
distributionKey |
private int |
keySize |
private static Logger |
log |
private LinkedHashMap<DocsumPacketKey,BasicPacket> |
packets |
private static PacketWrapper.ResultPacketComparator<BasicPacket> |
resultPacketComparator |
private ArrayList<BasicPacket> |
resultPackets |
Constructor and Description |
---|
PacketWrapper(CacheKey key,
BasicPacket[] packets)
Only used by PacketCacheTestCase, should not be used otherwise
|
PacketWrapper(CacheKey key,
DocsumPacketKey[] packetKeys,
BasicPacket[] bpackets,
Optional<Integer> distributionKey) |
Modifier and Type | Method and Description |
---|---|
void |
addDocsums(DocsumPacketKey[] packetKeys,
BasicPacket[] bpackets,
int offset) |
void |
addDocsums(DocsumPacketKey[] packetKeys,
Packet[] packets) |
void |
addResultPacket(QueryResultPacket resultPacket) |
private void |
cleanResultPackets() |
Object |
clone()
Straightforward shallow copy.
|
Optional<Integer> |
distributionKey()
Returns the distribution key of the content node producing these hits,
or empty if the hits were returned through dispatch
|
List<DocumentInfo> |
getDocuments(int offset,
int hits)
Returns the list of documents, null if not all are available
|
QueryResultPacket |
getFirstResultPacket() |
int |
getNumPackets() |
(package private) BasicPacket |
getPacket(DocsumPacketKey packetKey) |
(package private) BasicPacket |
getPacket(com.yahoo.document.GlobalId globalId,
int partid,
String summaryClass) |
int |
getPacketsSize() |
List<BasicPacket> |
getResultPackets()
Only for testing.
|
(package private) long |
getTimestamp() |
void |
setTimestamp(long timestamp) |
private static Logger log
private final int keySize
private ArrayList<BasicPacket> resultPackets
private LinkedHashMap<DocsumPacketKey,BasicPacket> packets
private static PacketWrapper.ResultPacketComparator<BasicPacket> resultPacketComparator
public PacketWrapper(CacheKey key, DocsumPacketKey[] packetKeys, BasicPacket[] bpackets, Optional<Integer> distributionKey)
public PacketWrapper(CacheKey key, BasicPacket[] packets)
public QueryResultPacket getFirstResultPacket()
public Optional<Integer> distributionKey()
public List<DocumentInfo> getDocuments(int offset, int hits)
public void addResultPacket(QueryResultPacket resultPacket)
private void cleanResultPackets()
public List<BasicPacket> getResultPackets()
public void addDocsums(DocsumPacketKey[] packetKeys, BasicPacket[] bpackets, int offset)
public void addDocsums(DocsumPacketKey[] packetKeys, Packet[] packets)
public int getNumPackets()
BasicPacket getPacket(com.yahoo.document.GlobalId globalId, int partid, String summaryClass)
BasicPacket getPacket(DocsumPacketKey packetKey)
long getTimestamp()
public void setTimestamp(long timestamp)
public int getPacketsSize()
Copyright © 2018. All rights reserved.