Class: Couchbase::Management::BucketSettings
- Inherits:
-
Object
- Object
- Couchbase::Management::BucketSettings
- Defined in:
- lib/couchbase/management/bucket_manager.rb
Instance Attribute Summary collapse
-
#bucket_type ⇒ :couchbase, ...
The type of the bucket.
-
#compression_mode ⇒ :off, ...
The compression mode to use.
-
#conflict_resolution_type ⇒ :timestamp, :sequence_number
Conflict resolution policy.
-
#ejection_policy ⇒ :full, :value_only
The eviction policy to use.
-
#flush_enabled ⇒ Boolean
Whether or not flush should be enabled on the bucket.
-
#max_expiry ⇒ Integer
Value of TTL (expiration) in seconds for new documents created without expiration.
-
#name ⇒ String
Name of the bucket.
-
#num_replicas ⇒ Integer
Number of replicas for documents.
-
#ram_quota_mb ⇒ Integer
RAM quota in megabytes for the bucket.
-
#replica_indexes ⇒ Boolean
Whether replica indexes should be enabled for the bucket.
Instance Method Summary collapse
-
#initialize {|self| ... } ⇒ BucketSettings
constructor
A new instance of BucketSettings.
Constructor Details
#initialize {|self| ... } ⇒ BucketSettings
Returns a new instance of BucketSettings.
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
.
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.
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.
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.
218 219 220 |
# File 'lib/couchbase/management/bucket_manager.rb', line 218 def ejection_policy @ejection_policy end |
#flush_enabled ⇒ Boolean
Returns 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_expiry ⇒ Integer
Returns 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 |
#name ⇒ String
Returns name of the bucket.
200 201 202 |
# File 'lib/couchbase/management/bucket_manager.rb', line 200 def name @name end |
#num_replicas ⇒ Integer
Returns 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_mb ⇒ Integer
Returns 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_indexes ⇒ Boolean
Returns 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 |