Class: Google::Cloud::Bigtable::Admin::V2::GcRule

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

Class Method Summary collapse

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.

Returns:

  • (::Google::Cloud::Bigtable::Admin::V2::GcRule::Intersection)

    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.



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 343

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.

Returns:

  • (::Google::Protobuf::Duration)

    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.



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 343

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.

Returns:

  • (::Integer)

    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.



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 343

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.

Returns:

  • (::Google::Cloud::Bigtable::Admin::V2::GcRule::Union)

    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.



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'proto_docs/google/bigtable/admin/v2/table.rb', line 343

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

Parameters:

Returns:



50
51
52
53
54
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 50

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

Parameters:

Returns:



40
41
42
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 40

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

Parameters:

  • value (Integer)

    The max_num_versions

Returns:



30
31
32
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 30

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

Parameters:

Returns:



62
63
64
65
66
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/helpers.rb', line 62

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