Class: Google::Cloud::Bigtable::Admin::V2::GcRule
- Inherits:
-
Object
- Object
- Google::Cloud::Bigtable::Admin::V2::GcRule
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb,
proto_docs/google/bigtable/admin/v2/table.rb
Overview
Rule for determining which cells to delete during garbage collection.
Defined Under Namespace
Classes: Intersection, Union
Instance Attribute Summary collapse
-
#intersection ⇒ ::Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection
Delete cells that would be deleted by every nested rule.
-
#max_age ⇒ ::Google::Protobuf::Duration
Delete cells in a column older than the given age.
-
#max_num_versions ⇒ ::Integer
Delete all cells in a column except the most recent N.
-
#union ⇒ ::Google::Cloud::Bigtable::Admin::V2::GcRule::Union
Delete cells that would be deleted by any nested rule.
Class Method Summary collapse
-
.intersection(*rules) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule that is an intersection of rules.
-
.max_age(value) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule for max_age.
-
.max_num_versions(value) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule for max_num_versions.
-
.union(*rules) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule that is a union of rules.
Instance Attribute Details
#intersection ⇒ ::Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection
Returns Delete cells that would be deleted by every nested rule.
Note: The following fields are mutually exclusive: intersection, max_num_versions, max_age, union. If a field in that set is populated, all other fields in the set will automatically be cleared.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 401 class GcRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A GcRule which deletes cells matching all of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Only delete cells which would be deleted by every element of `rules`. class Intersection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A GcRule which deletes cells matching any of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Delete cells which would be deleted by any element of `rules`. class Union include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#max_age ⇒ ::Google::Protobuf::Duration
Returns Delete cells in a column older than the given age. Values must be at least one millisecond, and will be truncated to microsecond granularity.
Note: The following fields are mutually exclusive: max_age, max_num_versions, intersection, union. If a field in that set is populated, all other fields in the set will automatically be cleared.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 401 class GcRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A GcRule which deletes cells matching all of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Only delete cells which would be deleted by every element of `rules`. class Intersection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A GcRule which deletes cells matching any of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Delete cells which would be deleted by any element of `rules`. class Union include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#max_num_versions ⇒ ::Integer
Returns Delete all cells in a column except the most recent N.
Note: The following fields are mutually exclusive: max_num_versions, max_age, intersection, union. If a field in that set is populated, all other fields in the set will automatically be cleared.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 401 class GcRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A GcRule which deletes cells matching all of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Only delete cells which would be deleted by every element of `rules`. class Intersection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A GcRule which deletes cells matching any of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Delete cells which would be deleted by any element of `rules`. class Union include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#union ⇒ ::Google::Cloud::Bigtable::Admin::V2::GcRule::Union
Returns Delete cells that would be deleted by any nested rule.
Note: The following fields are mutually exclusive: union, max_num_versions, max_age, intersection. If a field in that set is populated, all other fields in the set will automatically be cleared.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 401 class GcRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A GcRule which deletes cells matching all of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Only delete cells which would be deleted by every element of `rules`. class Intersection include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A GcRule which deletes cells matching any of the given rules. # @!attribute [rw] rules # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::GcRule>] # Delete cells which would be deleted by any element of `rules`. class Union include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
Class Method Details
.intersection(*rules) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule that is an intersection of rules
51 52 53 54 55 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 51 def self.intersection *rules rules = Array(rules.first) if rules.size == 1 intersection = Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection.new rules: rules new intersection: intersection end |
.max_age(value) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule for max_age
41 42 43 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 41 def self.max_age value new max_age: value end |
.max_num_versions(value) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule for max_num_versions
31 32 33 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 31 def self.max_num_versions value new max_num_versions: value end |
.union(*rules) ⇒ Google::Cloud::Bigtable::Admin::V2::GcRule
Construct a GcRule that is a union of rules
63 64 65 66 67 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 63 def self.union *rules rules = Array(rules.first) if rules.size == 1 union = Google::Cloud::Bigtable::Admin::V2::GcRule::Union.new rules: rules new union: union end |