public class Count extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Count.Builder
Helper for creating immutable
Count queries. |
Modifier and Type | Field and Description |
---|---|
static Document |
ALL
An (empty) query document to find all documents.
|
static Version |
MAX_TIMEOUT_VERSION
The first version of MongoDB to support the
count command with
the ability to limit the execution time on the server. |
Modifier | Constructor and Description |
---|---|
protected |
Count(Count.Builder builder)
Creates a new Count.
|
Modifier and Type | Method and Description |
---|---|
static Count.Builder |
builder()
Creates a new builder for a
Count . |
long |
getMaximumTimeMilliseconds()
Returns the maximum amount of time to allow the query to run on the
Server before it is aborted.
|
Document |
getQuery()
Returns the query document.
|
ReadPreference |
getReadPreference()
Returns the preference for the servers to retrieve the results from.
|
public static final Document ALL
public static final Version MAX_TIMEOUT_VERSION
count
command with
the ability to limit the execution time on the server.protected Count(Count.Builder builder)
builder
- The builder to copy the query fields from.public static Count.Builder builder()
Count
.Count
.public long getMaximumTimeMilliseconds()
public Document getQuery()
public ReadPreference getReadPreference()
null
in which case the default read preference should be
used.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.