public class CreateCollectionOptions
extends java.lang.Object
Constructor and Description |
---|
CreateCollectionOptions() |
Modifier and Type | Method and Description |
---|---|
CreateCollectionOptions |
autoIndex(boolean autoIndex)
Deprecated.
this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0
|
CreateCollectionOptions |
capped(boolean capped)
sets whether the collection is capped.
|
CreateCollectionOptions |
collation(Collation collation)
Sets the collation options
|
Collation |
getCollation()
Returns the collation options
|
IndexOptionDefaults |
getIndexOptionDefaults()
Gets the index option defaults for the collection.
|
long |
getMaxDocuments()
Gets the maximum number of documents allowed in a capped collection.
|
long |
getSizeInBytes()
Gets the maximum size in bytes of a capped collection.
|
Bson |
getStorageEngineOptions()
Gets the storage engine options document for the collection.
|
ValidationOptions |
getValidationOptions()
Gets the validation options for documents being inserted or updated in a collection
|
CreateCollectionOptions |
indexOptionDefaults(IndexOptionDefaults indexOptionDefaults)
Sets the index option defaults for the collection.
|
boolean |
isAutoIndex()
Deprecated.
this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0
|
boolean |
isCapped()
Gets whether the collection is capped.
|
java.lang.Boolean |
isUsePowerOf2Sizes()
Deprecated.
As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB server
|
CreateCollectionOptions |
maxDocuments(long maxDocuments)
Sets the maximum number of documents allowed in a capped collection.
|
CreateCollectionOptions |
sizeInBytes(long sizeInBytes)
Gets the maximum size of in bytes of a capped collection.
|
CreateCollectionOptions |
storageEngineOptions(Bson storageEngineOptions)
Sets the storage engine options document defaults for the collection
|
java.lang.String |
toString() |
CreateCollectionOptions |
usePowerOf2Sizes(java.lang.Boolean usePowerOf2Sizes)
Deprecated.
As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB server
|
CreateCollectionOptions |
validationOptions(ValidationOptions validationOptions)
Sets the validation options for documents being inserted or updated in a collection
|
@Deprecated public boolean isAutoIndex()
@Deprecated public CreateCollectionOptions autoIndex(boolean autoIndex)
autoIndex
- true if auto-index is enabledpublic long getMaxDocuments()
public CreateCollectionOptions maxDocuments(long maxDocuments)
maxDocuments
- the maximum number of documents allowed in capped collectionpublic boolean isCapped()
public CreateCollectionOptions capped(boolean capped)
capped
- whether the collection is cappedpublic long getSizeInBytes()
public CreateCollectionOptions sizeInBytes(long sizeInBytes)
sizeInBytes
- the maximum size of a capped collection.@Deprecated @Nullable public java.lang.Boolean isUsePowerOf2Sizes()
@Deprecated public CreateCollectionOptions usePowerOf2Sizes(@Nullable java.lang.Boolean usePowerOf2Sizes)
usePowerOf2Sizes
- true if the usePowerOf2Sizes allocation strategy is turned on for this collection@Nullable public Bson getStorageEngineOptions()
public CreateCollectionOptions storageEngineOptions(@Nullable Bson storageEngineOptions)
storageEngineOptions
- the storage engine optionspublic IndexOptionDefaults getIndexOptionDefaults()
public CreateCollectionOptions indexOptionDefaults(IndexOptionDefaults indexOptionDefaults)
indexOptionDefaults
- the index option defaultspublic ValidationOptions getValidationOptions()
public CreateCollectionOptions validationOptions(ValidationOptions validationOptions)
validationOptions
- the validation options@Nullable public Collation getCollation()
public CreateCollectionOptions collation(@Nullable Collation collation)
A null value represents the server default.
collation
- the collation options to usepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved