public class QueryResponse extends java.lang.Object implements ByteSerializable, Event
ByteSerializable.Deserialize
Modifier and Type | Field and Description |
---|---|
long |
count |
Constructor and Description |
---|
QueryResponse(java.util.List<QueryResult> response,
java.lang.String queryID,
long count,
java.lang.String query)
Constructs a QueryResponse to the query with the specified ID.
|
QueryResponse(SerializationInputStream in) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getQuery()
Returns the base query.
|
java.lang.String |
getQueryID()
Returns the base query's unique ID
|
java.util.List<QueryResult> |
getResponse()
Returns the list of QueryResults that were created during the
processing of the base query.
|
void |
serialize(SerializationOutputStream out)
Serializes this object to binary form by passing it through a
serialization stream.
|
public QueryResponse(java.util.List<QueryResult> response, java.lang.String queryID, long count, java.lang.String query)
response
- the list of QueryResultsqueryID
- the base query's IDcount
- the number of segments on the storage node. This can be
set to 0 if not needed.query
- the base query@ByteSerializable.Deserialize public QueryResponse(SerializationInputStream in) throws java.io.IOException, SerializationException
java.io.IOException
SerializationException
public java.lang.String getQueryID()
public java.lang.String getQuery()
public java.util.List<QueryResult> getResponse()
public void serialize(SerializationOutputStream out) throws java.io.IOException
ByteSerializable
serialize
in interface ByteSerializable
out
- stream to serialize to.java.io.IOException