Class: Couchbase::Management::BucketSettings

Inherits:
Object
  • Object
show all
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:

[View source]

236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/couchbase/management/bucket_manager.rb', line 236

def initialize
  @bucket_type = :couchbase
  @name = nil
  @healthy = true
  @flush_enabled = false
  @ram_quota_mb = 100
  @num_replicas = 1
  @replica_indexes = false
  @max_expiry = 0
  @compression_mode = :passive
  @conflict_resolution_type = :sequence_number
  @ejection_policy = :value_only
  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


215
216
217
# File 'lib/couchbase/management/bucket_manager.rb', line 215

def bucket_type
  @bucket_type
end

#compression_mode:off, ...

Returns the compression mode to use.

Returns:

  • (:off, :passive, :active)

    the compression mode to use


224
225
226
# File 'lib/couchbase/management/bucket_manager.rb', line 224

def compression_mode
  @compression_mode
end

#conflict_resolution_type:timestamp, :sequence_number

Returns conflict resolution policy.

Returns:

  • (:timestamp, :sequence_number)

    conflict resolution policy


227
228
229
# File 'lib/couchbase/management/bucket_manager.rb', line 227

def conflict_resolution_type
  @conflict_resolution_type
end

#ejection_policy:full, :value_only

Returns the eviction policy to use.

Returns:

  • (:full, :value_only)

    the eviction policy to use


218
219
220
# File 'lib/couchbase/management/bucket_manager.rb', line 218

def ejection_policy
  @ejection_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.


203
204
205
# File 'lib/couchbase/management/bucket_manager.rb', line 203

def flush_enabled
  @flush_enabled
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


221
222
223
# File 'lib/couchbase/management/bucket_manager.rb', line 221

def max_expiry
  @max_expiry
end

#nameString

Returns name of the bucket.

Returns:

  • (String)

    name of the bucket


200
201
202
# File 'lib/couchbase/management/bucket_manager.rb', line 200

def name
  @name
end

#num_replicasInteger

Returns number of replicas for documents.

Returns:

  • (Integer)

    number of replicas for documents


209
210
211
# File 'lib/couchbase/management/bucket_manager.rb', line 209

def num_replicas
  @num_replicas
end

#ram_quota_mbInteger

Returns RAM quota in megabytes for the bucket.

Returns:

  • (Integer)

    RAM quota in megabytes for the bucket


206
207
208
# File 'lib/couchbase/management/bucket_manager.rb', line 206

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


212
213
214
# File 'lib/couchbase/management/bucket_manager.rb', line 212

def replica_indexes
  @replica_indexes
end