Package com.mongodb.client.model
Class CreateCollectionOptions
java.lang.Object
com.mongodb.client.model.CreateCollectionOptions
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Options for creating a collection
- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoIndex
(boolean autoIndex) Deprecated.this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0capped
(boolean capped) Deprecated.sets whether the collection is capped.Deprecated.Sets the collation optionsDeprecated.Returns the collation optionsDeprecated.Gets the index option defaults for the collection.long
Deprecated.Gets the maximum number of documents allowed in a capped collection.long
Deprecated.Gets the maximum size in bytes of a capped collection.Deprecated.Gets the storage engine options document for the collection.Deprecated.Gets the validation options for documents being inserted or updated in a collectionindexOptionDefaults
(IndexOptionDefaults indexOptionDefaults) Deprecated.Sets the index option defaults for the collection.boolean
Deprecated.this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0boolean
isCapped()
Deprecated.Gets whether the collection is capped.Deprecated.As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB servermaxDocuments
(long maxDocuments) Deprecated.Sets the maximum number of documents allowed in a capped collection.sizeInBytes
(long sizeInBytes) Deprecated.Gets the maximum size of in bytes of a capped collection.storageEngineOptions
(Bson storageEngineOptions) Deprecated.Sets the storage engine options document defaults for the collectiontoString()
Deprecated.usePowerOf2Sizes
(Boolean usePowerOf2Sizes) Deprecated.As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB servervalidationOptions
(ValidationOptions validationOptions) Deprecated.Sets the validation options for documents being inserted or updated in a collection
-
Constructor Details
-
CreateCollectionOptions
public CreateCollectionOptions()Deprecated.
-
-
Method Details
-
isAutoIndex
Deprecated.this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0Gets if auto-index is enabled- Returns:
- true if auto-index is enabled
-
autoIndex
Deprecated.this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0Gets if auto-index is to be enabled on the collection- Parameters:
autoIndex
- true if auto-index is enabled- Returns:
- this
-
getMaxDocuments
public long getMaxDocuments()Deprecated.Gets the maximum number of documents allowed in a capped collection.- Returns:
- max number of documents in a capped collection
-
maxDocuments
Deprecated.Sets the maximum number of documents allowed in a capped collection.- Parameters:
maxDocuments
- the maximum number of documents allowed in capped collection- Returns:
- this
-
isCapped
public boolean isCapped()Deprecated.Gets whether the collection is capped.- Returns:
- whether the collection is capped
-
capped
Deprecated.sets whether the collection is capped.- Parameters:
capped
- whether the collection is capped- Returns:
- this
-
getSizeInBytes
public long getSizeInBytes()Deprecated.Gets the maximum size in bytes of a capped collection.- Returns:
- the maximum size of a capped collection.
-
sizeInBytes
Deprecated.Gets the maximum size of in bytes of a capped collection.- Parameters:
sizeInBytes
- the maximum size of a capped collection.- Returns:
- this
-
isUsePowerOf2Sizes
Deprecated.As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB serverGets whether the usePowerOf2Sizes allocation strategy is turned on for this collection.- Returns:
- true if the usePowerOf2Sizes allocation strategy is turned on for this collection
-
usePowerOf2Sizes
Deprecated.As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB serverSets whether the usePowerOf2Sizes allocation strategy is turned on for this collection.- Parameters:
usePowerOf2Sizes
- true if the usePowerOf2Sizes allocation strategy is turned on for this collection- Returns:
- this
-
getStorageEngineOptions
Deprecated.Gets the storage engine options document for the collection.- Returns:
- the storage engine options
-
storageEngineOptions
Deprecated.Sets the storage engine options document defaults for the collection- Parameters:
storageEngineOptions
- the storage engine options- Returns:
- this
-
getIndexOptionDefaults
Deprecated.Gets the index option defaults for the collection.- Returns:
- the index option defaults
- Since:
- 3.2
-
indexOptionDefaults
Deprecated.Sets the index option defaults for the collection.- Parameters:
indexOptionDefaults
- the index option defaults- Returns:
- this
- Since:
- 3.2
-
getValidationOptions
Deprecated.Gets the validation options for documents being inserted or updated in a collection- Returns:
- the validation options
- Since:
- 3.2
-
validationOptions
Deprecated.Sets the validation options for documents being inserted or updated in a collection- Parameters:
validationOptions
- the validation options- Returns:
- this
- Since:
- 3.2
-
getCollation
Deprecated.Returns the collation options- Returns:
- the collation options
- Since:
- 3.4
-
collation
Deprecated.Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
- Since:
- 3.4
-
toString
Deprecated.
-