T - the type of document to decode query results topublic class QueryResult<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private long |
cursorId |
private MongoNamespace |
namespace |
private java.util.List<T> |
results |
private ServerAddress |
serverAddress |
| Constructor and Description |
|---|
QueryResult(MongoNamespace namespace,
java.util.List<T> results,
long cursorId,
ServerAddress serverAddress)
Construct an instance.
|
QueryResult(MongoNamespace namespace,
ReplyMessage<T> replyMessage,
ServerAddress address)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
ServerAddress |
getAddress()
Gets the server address.
|
ServerCursor |
getCursor()
Gets the cursor.
|
MongoNamespace |
getNamespace()
Gets the namespace.
|
java.util.List<T> |
getResults()
Gets the results.
|
private final MongoNamespace namespace
private final java.util.List<T> results
private final long cursorId
private final ServerAddress serverAddress
public QueryResult(MongoNamespace namespace, java.util.List<T> results, long cursorId, ServerAddress serverAddress)
namespace - the namespaceresults - the query resultscursorId - the cursor idserverAddress - the server addressQueryResult(MongoNamespace namespace, ReplyMessage<T> replyMessage, ServerAddress address)
namespace - the namespacereplyMessage - the reply messageaddress - the server addresspublic MongoNamespace getNamespace()
public ServerCursor getCursor()
public java.util.List<T> getResults()
public ServerAddress getAddress()