public class CollectionOptions extends Object
| Constructor and Description |
|---|
CollectionOptions(Integer size,
Integer maxDocuments,
Boolean capped)
Constructs a new
CollectionOptions instance. |
| Modifier and Type | Method and Description |
|---|---|
CollectionOptions |
capped(int size)
Create new
CollectionOptions with already given settings and capped set to true. |
CollectionOptions |
collation(Collation collation)
Create new
CollectionOptions with already given settings and collation set to given value. |
static CollectionOptions |
empty()
Create new empty
CollectionOptions. |
Boolean |
getCapped() |
Optional<Collation> |
getCollation()
Get the
Collation settings. |
Integer |
getMaxDocuments() |
Integer |
getSize() |
static CollectionOptions |
just(Collation collation)
Create new
CollectionOptions by just providing the Collation to use. |
CollectionOptions |
maxDocuments(Integer maxDocuments)
Create new
CollectionOptions with already given settings and maxDocuments set to given value. |
void |
setCapped(Boolean capped) |
void |
setCollation(Collation collation)
Set
Collation options. |
void |
setMaxDocuments(Integer maxDocuments) |
void |
setSize(Integer size) |
CollectionOptions |
size(int size)
Create new
CollectionOptions with already given settings and size set to given value. |
public CollectionOptions(Integer size, Integer maxDocuments, Boolean capped)
CollectionOptions instance.size - the collection size in bytes, this data space is preallocated.maxDocuments - the maximum number of documents in the collection.capped - true to created a "capped" collection (fixed size with auto-FIFO behavior based on insertion order),
false otherwise.public static CollectionOptions just(Collation collation)
CollectionOptions by just providing the Collation to use.collation - must not be null.CollectionOptions.public static CollectionOptions empty()
CollectionOptions.CollectionOptions.public CollectionOptions capped(int size)
CollectionOptions with already given settings and capped set to true.size - the collection size in bytes, this data space is preallocated.CollectionOptions.public CollectionOptions maxDocuments(Integer maxDocuments)
CollectionOptions with already given settings and maxDocuments set to given value.maxDocuments - can be null.CollectionOptions.public CollectionOptions size(int size)
CollectionOptions with already given settings and size set to given value.size - can be null.CollectionOptions.public CollectionOptions collation(Collation collation)
CollectionOptions with already given settings and collation set to given value.collation - can be null.CollectionOptions.public Integer getMaxDocuments()
public void setMaxDocuments(Integer maxDocuments)
public Integer getSize()
public void setSize(Integer size)
public Boolean getCapped()
public void setCapped(Boolean capped)
public void setCollation(Collation collation)
Collation options.collation - Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.