public final class ChangelogUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addIndex(com.mongodb.DBCollection collection,
String field,
boolean asc,
boolean background)
Add an index on the given collection and field
|
static void |
addTTLIndex(com.mongodb.DBCollection collection,
String field,
int ttl)
adds a TTL index to the given collection.
|
public static void addTTLIndex(com.mongodb.DBCollection collection,
String field,
int ttl)
collection - the collection to use for the TTL indexfield - the field to use for the TTL indexttl - the TTL to set on the given fieldIllegalArgumentException - if the TTL is less or equal 0public static void addIndex(com.mongodb.DBCollection collection,
String field,
boolean asc,
boolean background)
collection - the collection to use for the indexfield - the field to use for the indexasc - the sorting direction. true to sort ascending; false to sort descendingbackground - iff true the index is created in the backgroundCopyright © 2013–2015 Taimos GmbH. All rights reserved.