Class: Couchbase::Management::BucketSettings

Inherits:
Object
  • Object
show all
Extended by:
Gem::Deprecate
Defined in:
lib/couchbase/management/bucket_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|self| ... } ⇒ BucketSettings

Returns a new instance of BucketSettings.

Yield Parameters:



446
447
448
# File 'lib/couchbase/management/bucket_manager.rb', line 446

def initialize
  yield self if block_given?
end

Instance Attribute Details

#bucket_type:couchbase, ...

Returns the type of the bucket. Defaults to :couchbase.

Returns:

  • (:couchbase, :memcached, :ephemeral)

    the type of the bucket. Defaults to :couchbase



374
375
376
# File 'lib/couchbase/management/bucket_manager.rb', line 374

def bucket_type
  @bucket_type
end

#compression_mode:off, ...

Returns the compression mode to use.

Returns:

  • (:off, :passive, :active)

    the compression mode to use



403
404
405
# File 'lib/couchbase/management/bucket_manager.rb', line 403

def compression_mode
  @compression_mode
end

#conflict_resolution_type:timestamp, ...

Returns conflict resolution policy.

Returns:

  • (:timestamp, :sequence_number, :custom)

    conflict resolution policy



406
407
408
# File 'lib/couchbase/management/bucket_manager.rb', line 406

def conflict_resolution_type
  @conflict_resolution_type
end

#eviction_policy:full, ...

Eviction policy to use

:full

During ejection, only the value will be ejected (key and metadata will remain in memory). Value Ejection needs more system memory, but provides better performance than Full Ejection. This value is only valid for buckets of type :couchbase.

:value_only

During ejection, everything (including key, metadata, and value) will be ejected. Full Ejection reduces the memory overhead requirement, at the cost of performance. This value is only valid for buckets of type :couchbase.

:no_eviction

Couchbase Server keeps all data until explicitly deleted, but will reject any new data if you reach the quota (dedicated memory) you set for your bucket. This value is only valid for buckets of type :ephemeral.

:not_recently_used

When the memory quota is reached, Couchbase Server ejects data that has not been used recently. This value is only valid for buckets of type :ephemeral.

Returns:

  • (:full, :value_only, :no_eviction, :not_recently_used)

    the eviction policy to use



397
398
399
# File 'lib/couchbase/management/bucket_manager.rb', line 397

def eviction_policy
  @eviction_policy
end

#flush_enabledBoolean

Returns whether or not flush should be enabled on the bucket. Defaults to false.

Returns:

  • (Boolean)

    whether or not flush should be enabled on the bucket. Defaults to false.



362
363
364
# File 'lib/couchbase/management/bucket_manager.rb', line 362

def flush_enabled
  @flush_enabled
end

#history_retention_bytesInteger?

collections in this bucket

Returns:

  • (Integer, nil)

    the maximum size, in bytes, of the change history that is written to disk for all



416
417
418
# File 'lib/couchbase/management/bucket_manager.rb', line 416

def history_retention_bytes
  @history_retention_bytes
end

#history_retention_collection_defaultBoolean?

Returns whether to enable history retention on collections by default.

Returns:

  • (Boolean, nil)

    whether to enable history retention on collections by default



412
413
414
# File 'lib/couchbase/management/bucket_manager.rb', line 412

def history_retention_collection_default
  @history_retention_collection_default
end

#history_retention_durationInteger?

collections in this bucket

Returns:

  • (Integer, nil)

    the maximum duration, in seconds, to be covered by the change history that is written to disk for all



420
421
422
# File 'lib/couchbase/management/bucket_manager.rb', line 420

def history_retention_duration
  @history_retention_duration
end

#max_expiryInteger

Returns value of TTL (expiration) in seconds for new documents created without expiration.

Returns:

  • (Integer)

    value of TTL (expiration) in seconds for new documents created without expiration



400
401
402
# File 'lib/couchbase/management/bucket_manager.rb', line 400

def max_expiry
  @max_expiry
end

#minimum_durability_levelnil, ...

Returns the minimum durability level.

Returns:

  • (nil, :none, :majority, :majority_and_persist_to_active, :persist_to_majority)

    the minimum durability level



409
410
411
# File 'lib/couchbase/management/bucket_manager.rb', line 409

def minimum_durability_level
  @minimum_durability_level
end

#nameString

Returns name of the bucket.

Returns:

  • (String)

    name of the bucket



359
360
361
# File 'lib/couchbase/management/bucket_manager.rb', line 359

def name
  @name
end

#num_replicasInteger

Returns number of replicas for documents.

Returns:

  • (Integer)

    number of replicas for documents



368
369
370
# File 'lib/couchbase/management/bucket_manager.rb', line 368

def num_replicas
  @num_replicas
end

#num_vbucketsInteger?

Returns the number of vBuckets the bucket should have. If not set, the server default will be used.

Returns:

  • (Integer, nil)

    the number of vBuckets the bucket should have. If not set, the server default will be used



423
424
425
# File 'lib/couchbase/management/bucket_manager.rb', line 423

def num_vbuckets
  @num_vbuckets
end

#ram_quota_mbInteger

Returns RAM quota in megabytes for the bucket.

Returns:

  • (Integer)

    RAM quota in megabytes for the bucket



365
366
367
# File 'lib/couchbase/management/bucket_manager.rb', line 365

def ram_quota_mb
  @ram_quota_mb
end

#replica_indexesBoolean

Returns whether replica indexes should be enabled for the bucket.

Returns:

  • (Boolean)

    whether replica indexes should be enabled for the bucket



371
372
373
# File 'lib/couchbase/management/bucket_manager.rb', line 371

def replica_indexes
  @replica_indexes
end

#storage_backendnil, ...

Returns the type of the storage backend of the bucket.

Returns:

  • (nil, :couchstore, :magma)

    the type of the storage backend of the bucket



377
378
379
# File 'lib/couchbase/management/bucket_manager.rb', line 377

def storage_backend
  @storage_backend
end

Instance Method Details

#ejection_policyObject

Deprecated.

Use #eviction_policy instead



432
433
434
# File 'lib/couchbase/management/bucket_manager.rb', line 432

def ejection_policy
  @eviction_policy
end

#ejection_policy=(val) ⇒ Object

Deprecated.

Use #eviction_policy= instead



439
440
441
# File 'lib/couchbase/management/bucket_manager.rb', line 439

def ejection_policy=(val)
  @eviction_policy = val
end