io.vertx.ext.mongo

## Class CreateCollectionOptions

- java.lang.Object
- - io.vertx.ext.mongo.CreateCollectionOptions

-     public class CreateCollectionOptions
      extends Object

  Options for creating a collection

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CreateCollectionOptions()`
    `CreateCollectionOptions(CreateCollectionOptions createCollectionOptions)`
    `CreateCollectionOptions(JsonObject json)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Boolean` | `getCapped()`
    `CollationOptions` | `getCollation()`
    `JsonObject` | `getIndexOptionDefaults()`
    `Long` | `getMaxDocuments()`
    `Long` | `getSizeInBytes()`
    `JsonObject` | `getStorageEngineOptions()`
    `TimeSeriesOptions` | `getTimeSeriesOptions()`
    `ValidationOptions` | `getValidationOptions()`
    `int` | `hashCode()`
    `CreateCollectionOptions` | `setCapped(Boolean capped)` Optional.
    `CreateCollectionOptions` | `setCollation(CollationOptions collation)` Specifies the default collation for the collection.
    `CreateCollectionOptions` | `setIndexOptionDefaults(JsonObject indexOptionDefaults)` Optional.
    `CreateCollectionOptions` | `setMaxDocuments(Long maxDocuments)` Optional.
    `CreateCollectionOptions` | `setSizeInBytes(Long sizeInBytes)` Optional.
    `CreateCollectionOptions` | `setStorageEngineOptions(JsonObject storageEngineOptions)` Optional.
    `CreateCollectionOptions` | `setTimeSeriesOptions(TimeSeriesOptions timeSeriesOptions)`
    `CreateCollectionOptions` | `setValidationOptions(ValidationOptions validationOptions)`
    `JsonObject` | `toJson()`
    `com.mongodb.client.model.CreateCollectionOptions` | `toMongoDriverObject()` Returns the mongo-java-driver specific object.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CreateCollectionOptions

          public CreateCollectionOptions()

    - #### CreateCollectionOptions

          public CreateCollectionOptions(CreateCollectionOptions createCollectionOptions)

    - #### CreateCollectionOptions

          public CreateCollectionOptions(JsonObject json)

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

    - #### getMaxDocuments

          public Long getMaxDocuments()

    - #### setMaxDocuments

          public CreateCollectionOptions setMaxDocuments(Long maxDocuments)

      Optional. The maximum number of documents allowed in the capped collection. The size limit takes precedence over this limit. If a capped collection reaches the size limit before it reaches the maximum number of documents, MongoDB removes old documents. If you prefer to use the max limit, ensure that the size limit, which is required for a capped collection, is sufficient to contain the maximum number of documents.
      Parameters:
        `maxDocuments` -
      Returns:
        CreateCollectionOptions

    - #### toMongoDriverObject

          public com.mongodb.client.model.CreateCollectionOptions toMongoDriverObject()

      Returns the mongo-java-driver specific object.
      Returns:
        com.mongodb.client.model.CreateCollectionOptions

    - #### setCapped

          public CreateCollectionOptions setCapped(Boolean capped)

      Optional. To create a capped collection, specify true. If you specify true, you must also set a maximum size in the size field.
      Parameters:
        `capped` -
      Returns:
        CreateCollectionOptions

    - #### getCapped

          public Boolean getCapped()

    - #### getTimeSeriesOptions

          public TimeSeriesOptions getTimeSeriesOptions()

    - #### setTimeSeriesOptions

          public CreateCollectionOptions setTimeSeriesOptions(TimeSeriesOptions timeSeriesOptions)

    - #### getSizeInBytes

          public Long getSizeInBytes()

    - #### setSizeInBytes

          public CreateCollectionOptions setSizeInBytes(Long sizeInBytes)

      Optional. Specify a maximum size in bytes for a capped collection. Once a capped collection reaches its maximum size, MongoDB removes the older documents to make space for the new documents. The size field is required for capped collections and ignored for other collections.
      Parameters:
        `sizeInBytes` -
      Returns:
        CreateCollectionOptions

    - #### getStorageEngineOptions

          @Nullable
          public JsonObject getStorageEngineOptions()

    - #### setStorageEngineOptions

          public CreateCollectionOptions setStorageEngineOptions(@Nullable
                                                                 JsonObject storageEngineOptions)

      Optional. Available for the WiredTiger storage engine only. Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection.
      Parameters:
        `storageEngineOptions` -
      Returns:
        CreateCollectionOptions

    - #### getIndexOptionDefaults

          public JsonObject getIndexOptionDefaults()

    - #### setIndexOptionDefaults

          public CreateCollectionOptions setIndexOptionDefaults(JsonObject indexOptionDefaults)

      Optional. Allows users to specify a default configuration for indexes when creating a collection.
      Parameters:
        `indexOptionDefaults` -
      Returns:
        CreateCollectionOptions

    - #### getValidationOptions

          public ValidationOptions getValidationOptions()

    - #### setValidationOptions

          public CreateCollectionOptions setValidationOptions(ValidationOptions validationOptions)

    - #### getCollation

          @Nullable
          public CollationOptions getCollation()

    - #### setCollation

          public CreateCollectionOptions setCollation(@Nullable
                                                      CollationOptions collation)

      Specifies the default collation for the collection. Collation allows users to specify language-specific rules for string comparison, such as rules for lettercase and accent marks.
      Parameters:
        `collation` -
      Returns:
        CreateCollectionOptions

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2023 Eclipse. All rights reserved.