Package io.vertx.mongo.client.model
Class CreateCollectionOptions
- java.lang.Object
-
- io.vertx.mongo.client.model.CreateCollectionOptions
-
public class CreateCollectionOptions extends java.lang.ObjectOptions for creating a collection- Since:
- 3.0
- MongoDB documentation
- Create Collection
-
-
Constructor Summary
Constructors Constructor Description CreateCollectionOptions()CreateCollectionOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollationgetCollation()Returns the collation optionsIndexOptionDefaultsgetIndexOptionDefaults()Gets the index option defaults for the collection.java.lang.LonggetMaxDocuments()Gets the maximum number of documents allowed in a capped collection.java.lang.LonggetSizeInBytes()Gets the maximum size in bytes of a capped collection.JsonObjectgetStorageEngineOptions()Gets the storage engine options document for the collection.ValidationOptionsgetValidationOptions()Gets the validation options for documents being inserted or updated in a collectionjava.lang.BooleanisCapped()Gets whether the collection is capped.CreateCollectionOptionssetCapped(java.lang.Boolean capped)sets whether the collection is capped.CreateCollectionOptionssetCollation(Collation collation)Sets the collation optionsCreateCollectionOptionssetIndexOptionDefaults(IndexOptionDefaults indexOptionDefaults)Sets the index option defaults for the collection.CreateCollectionOptionssetMaxDocuments(java.lang.Long maxDocuments)Sets the maximum number of documents allowed in a capped collection.CreateCollectionOptionssetSizeInBytes(java.lang.Long sizeInBytes)Gets the maximum size of in bytes of a capped collection.CreateCollectionOptionssetStorageEngineOptions(JsonObject storageEngineOptions)Sets the storage engine options document defaults for the collectionCreateCollectionOptionssetValidationOptions(ValidationOptions validationOptions)Sets the validation options for documents being inserted or updated in a collectionJsonObjecttoJson()
-
-
-
Constructor Detail
-
CreateCollectionOptions
public CreateCollectionOptions()
-
CreateCollectionOptions
public CreateCollectionOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setMaxDocuments
public CreateCollectionOptions setMaxDocuments(java.lang.Long maxDocuments)
Sets the maximum number of documents allowed in a capped collection.- Parameters:
maxDocuments- the maximum number of documents allowed in capped collection- Returns:
- this
-
getMaxDocuments
public java.lang.Long getMaxDocuments()
Gets the maximum number of documents allowed in a capped collection.- Returns:
- max number of documents in a capped collection
-
setCapped
public CreateCollectionOptions setCapped(java.lang.Boolean capped)
sets whether the collection is capped.- Parameters:
capped- whether the collection is capped- Returns:
- this
-
isCapped
public java.lang.Boolean isCapped()
Gets whether the collection is capped.- Returns:
- whether the collection is capped
-
setSizeInBytes
public CreateCollectionOptions setSizeInBytes(java.lang.Long sizeInBytes)
Gets the maximum size of in bytes of a capped collection.- Parameters:
sizeInBytes- the maximum size of a capped collection.- Returns:
- this
-
getSizeInBytes
public java.lang.Long getSizeInBytes()
Gets the maximum size in bytes of a capped collection.- Returns:
- the maximum size of a capped collection.
-
setStorageEngineOptions
public CreateCollectionOptions setStorageEngineOptions(JsonObject storageEngineOptions)
Sets the storage engine options document defaults for the collection- Parameters:
storageEngineOptions- the storage engine options- Returns:
- this
- Since server release
- 3.0
-
getStorageEngineOptions
public JsonObject getStorageEngineOptions()
Gets the storage engine options document for the collection.- Returns:
- the storage engine options
- Since server release
- 3.0
-
setIndexOptionDefaults
public CreateCollectionOptions setIndexOptionDefaults(IndexOptionDefaults indexOptionDefaults)
Sets the index option defaults for the collection.- Parameters:
indexOptionDefaults- the index option defaults- Returns:
- this
- Since:
- 3.2
- Since server release
- 3.2
-
getIndexOptionDefaults
public IndexOptionDefaults getIndexOptionDefaults()
Gets the index option defaults for the collection.- Returns:
- the index option defaults
- Since:
- 3.2
- Since server release
- 3.2
-
setValidationOptions
public CreateCollectionOptions setValidationOptions(ValidationOptions validationOptions)
Sets the validation options for documents being inserted or updated in a collection- Parameters:
validationOptions- the validation options- Returns:
- this
- Since:
- 3.2
- Since server release
- 3.2
-
getValidationOptions
public ValidationOptions getValidationOptions()
Gets the validation options for documents being inserted or updated in a collection- Returns:
- the validation options
- Since:
- 3.2
- Since server release
- 3.2
-
setCollation
public CreateCollectionOptions setCollation(Collation collation)
Sets the collation optionsA null value represents the server default.
- Parameters:
collation- the collation options to use- Returns:
- this
- Since:
- 3.4
- Since server release
- 3.4
-
-