Class: Google::Apis::PubsubliteV1::PartitionConfig
- Inherits:
-
Object
- Object
- Google::Apis::PubsubliteV1::PartitionConfig
- 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 partitions.
Instance Attribute Summary collapse
-
#capacity ⇒ Google::Apis::PubsubliteV1::Capacity
The throughput capacity configuration for each partition.
-
#count ⇒ Fixnum
The number of partitions in the topic.
-
#scale ⇒ Fixnum
DEPRECATED: Use capacity instead which can express a superset of configurations.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PartitionConfig
constructor
A new instance of PartitionConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PartitionConfig
Returns a new instance of PartitionConfig.
309 310 311 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 309 def initialize(**args) update!(**args) end |
Instance Attribute Details
#capacity ⇒ Google::Apis::PubsubliteV1::Capacity
The throughput capacity configuration for each partition.
Corresponds to the JSON property capacity
292 293 294 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 292 def capacity @capacity end |
#count ⇒ Fixnum
The number of partitions in the topic. Must be at least 1.
Corresponds to the JSON property count
297 298 299 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 297 def count @count end |
#scale ⇒ Fixnum
DEPRECATED: Use capacity instead which can express a superset of
configurations. Every partition in the topic is allocated throughput
equivalent to scale
times the standard partition throughput (4 MiB/s). This
is also reflected in the cost of this topic; a topic with scale
of 2 and
count of 10 is charged for 20 partitions. This value must be in the range [1,4]
.
Corresponds to the JSON property scale
307 308 309 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 307 def scale @scale end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
314 315 316 317 318 |
# File 'generated/google/apis/pubsublite_v1/classes.rb', line 314 def update!(**args) @capacity = args[:capacity] if args.key?(:capacity) @count = args[:count] if args.key?(:count) @scale = args[:scale] if args.key?(:scale) end |