Class: Google::Apis::PubsubliteV1::RetentionConfig
- Inherits:
-
Object
- Object
- Google::Apis::PubsubliteV1::RetentionConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/pubsublite_v1/classes.rb,
generated/google/apis/pubsublite_v1/representations.rb,
generated/google/apis/pubsublite_v1/representations.rb
Overview
The settings for a topic's message retention.
Instance Attribute Summary collapse
-
#per_partition_bytes ⇒ Fixnum
The provisioned storage, in bytes, per partition.
-
#period ⇒ String
How long a published message is retained.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RetentionConfig
constructor
A new instance of RetentionConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RetentionConfig
Returns a new instance of RetentionConfig.
365 366 367 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 365 def initialize(**args) update!(**args) end |
Instance Attribute Details
#per_partition_bytes ⇒ Fixnum
The provisioned storage, in bytes, per partition. If the number of bytes
stored in any of the topic's partitions grows beyond this value, older
messages will be dropped to make room for newer ones, regardless of the value
of period
.
Corresponds to the JSON property perPartitionBytes
356 357 358 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 356 def per_partition_bytes @per_partition_bytes end |
#period ⇒ String
How long a published message is retained. If unset, messages will be retained
as long as the bytes retained for each partition is below per_partition_bytes
.
Corresponds to the JSON property period
363 364 365 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 363 def period @period end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
370 371 372 373 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 370 def update!(**args) @per_partition_bytes = args[:per_partition_bytes] if args.key?(:per_partition_bytes) @period = args[:period] if args.key?(:period) end |