BucketManager

class BucketManager(core: Core)

Functions

Link copied to clipboard
suspend fun createBucket(name: String, common: CommonOptions = CommonOptions.Default, ramQuota: StorageSize = 100.mebibytes, bucketType: BucketType = BucketType.COUCHBASE, storageBackend: StorageBackend? = null, evictionPolicy: EvictionPolicyType? = null, flushEnabled: Boolean = false, replicas: Int = 1, maximumExpiry: Expiry = Expiry.none(), compressionMode: CompressionMode = CompressionMode.PASSIVE, minimumDurability: Durability = Durability.none(), conflictResolutionType: ConflictResolutionType = ConflictResolutionType.SEQUENCE_NUMBER)
suspend fun createBucket(name: String, common: CommonOptions = CommonOptions.Default, ramQuota: StorageSize = 100.mebibytes, bucketType: BucketType? = null, storageBackend: StorageBackend? = null, evictionPolicy: EvictionPolicyType? = null, flushEnabled: Boolean? = null, replicas: Int? = null, maximumExpiry: Expiry? = null, compressionMode: CompressionMode? = null, minimumDurability: Durability? = null, conflictResolutionType: ConflictResolutionType? = null, replicateViewIndexes: Boolean? = null, @SinceCouchbase(value = "7.2") historyRetentionCollectionDefault: Boolean? = null, @SinceCouchbase(value = "7.2") historyRetentionSize: StorageSize? = null, @SinceCouchbase(value = "7.2") historyRetentionDuration: Duration? = null)
Link copied to clipboard
suspend fun dropBucket(name: String, common: CommonOptions = CommonOptions.Default)

Deletes a bucket.

Link copied to clipboard
suspend fun flushBucket(bucketName: String, common: CommonOptions = CommonOptions.Default)

Removes all documents from a bucket.

Link copied to clipboard
suspend fun getAllBuckets(common: CommonOptions = CommonOptions.Default): List<BucketSettings>
Link copied to clipboard
suspend fun getBucket(name: String, common: CommonOptions = CommonOptions.Default): BucketSettings
Link copied to clipboard
suspend fun isHealthy(bucketName: String, common: CommonOptions = CommonOptions.Default): Boolean

Returns true if all nodes report a bucket status of "healthy".

Link copied to clipboard
suspend fun updateBucket(name: String, common: CommonOptions = CommonOptions.Default, ramQuota: StorageSize? = null, flushEnabled: Boolean? = null, replicas: Int? = null, maximumExpiry: Expiry? = null, compressionMode: CompressionMode? = null, minimumDurability: Durability? = null, evictionPolicy: EvictionPolicyType? = null)

suspend fun updateBucket(name: String, common: CommonOptions = CommonOptions.Default, ramQuota: StorageSize? = null, flushEnabled: Boolean? = null, replicas: Int? = null, maximumExpiry: Expiry? = null, compressionMode: CompressionMode? = null, minimumDurability: Durability? = null, evictionPolicy: EvictionPolicyType? = null, @SinceCouchbase(value = "7.2") historyRetentionCollectionDefault: Boolean? = null, @SinceCouchbase(value = "7.2") historyRetentionSize: StorageSize? = null, @SinceCouchbase(value = "7.2") historyRetentionDuration: Duration? = null)

Modifies an existing bucket.