java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ThrottleBucket,ThrottleBucket.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ThrottleBucket,ThrottleBucket.Builder>
com.hedera.hashgraph.sdk.proto.ThrottleBucket.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ThrottleBucketOrBuilder,Cloneable
- Enclosing class:
ThrottleBucket
public static final class ThrottleBucket.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ThrottleBucket,ThrottleBucket.Builder>
implements ThrottleBucketOrBuilder
* A "bucket" of performance allocated across one or more throttle groups.<br/> This entry combines one or more throttle groups into a single unit to calculate limitations and congestion. Each "bucket" "fills" as operations are completed, then "drains" over a period of time defined for each bucket. This fill-and-drain characteristic enables the network to process sudden bursts of heavy traffic while still observing throttle limits over longer timeframes. The value of `burstPeriodMs` is combined with the `milliOpsPerSec` values for the individual throttle groups to determine the total bucket "capacity". This combination MUST be less than the maximum value of a signed long integer (`9223372036854775807`), when scaled to a nanosecond measurement resolution. > Note >> There is some question regarding the mechanism of calculating the >> combination of `burstPeriodMs` and `milliOpsPerSec`. The calculation >> Is implemented in difficult-to-find code, and very likely does not >> match the approach described here.Protobuf type
proto.ThrottleBucket-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllThrottleGroups(Iterable<? extends ThrottleGroup> values) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.addThrottleGroups(int index, ThrottleGroup value) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.addThrottleGroups(int index, ThrottleGroup.Builder builderForValue) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.addThrottleGroups(ThrottleGroup value) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.addThrottleGroups(ThrottleGroup.Builder builderForValue) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.* A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket.* If set to true, this bucket is used for high-volume throttles.* A name for this bucket.<br/> This is used for log entries.* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.long* A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket.boolean* If set to true, this bucket is used for high-volume throttles.getName()* A name for this bucket.<br/> This is used for log entries.com.google.protobuf.ByteString* A name for this bucket.<br/> This is used for log entries.getThrottleGroups(int index) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.int* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.removeThrottleGroups(int index) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.setBurstPeriodMs(long value) * A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket.setHighVolume(boolean value) * If set to true, this bucket is used for high-volume throttles.* A name for this bucket.<br/> This is used for log entries.setNameBytes(com.google.protobuf.ByteString value) * A name for this bucket.<br/> This is used for log entries.setThrottleGroups(int index, ThrottleGroup value) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.setThrottleGroups(int index, ThrottleGroup.Builder builderForValue) * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getName
* A name for this bucket.<br/> This is used for log entries. <p> This value SHOULD NOT exceed 20 characters.
string name = 1;- Specified by:
getNamein interfaceThrottleBucketOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()* A name for this bucket.<br/> This is used for log entries. <p> This value SHOULD NOT exceed 20 characters.
string name = 1;- Specified by:
getNameBytesin interfaceThrottleBucketOrBuilder- Returns:
- The bytes for name.
-
setName
* A name for this bucket.<br/> This is used for log entries. <p> This value SHOULD NOT exceed 20 characters.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
* A name for this bucket.<br/> This is used for log entries. <p> This value SHOULD NOT exceed 20 characters.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
* A name for this bucket.<br/> This is used for log entries. <p> This value SHOULD NOT exceed 20 characters.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getBurstPeriodMs
public long getBurstPeriodMs()* A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket. The rate at which the bucket "drains" is set by the throttles, and this duration sets how long that rate must be sustained to empty a "full" bucket. That combination (calculated as the product of this value and the least common multiple of the `milliOpsPerSec` values for all throttle groups) determines the maximum amount of operations this bucket can "hold". <p> The calculated capacity of this bucket MUST NOT exceed `9,223,372,036,854`.
uint64 burstPeriodMs = 2;- Specified by:
getBurstPeriodMsin interfaceThrottleBucketOrBuilder- Returns:
- The burstPeriodMs.
-
setBurstPeriodMs
* A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket. The rate at which the bucket "drains" is set by the throttles, and this duration sets how long that rate must be sustained to empty a "full" bucket. That combination (calculated as the product of this value and the least common multiple of the `milliOpsPerSec` values for all throttle groups) determines the maximum amount of operations this bucket can "hold". <p> The calculated capacity of this bucket MUST NOT exceed `9,223,372,036,854`.
uint64 burstPeriodMs = 2;- Parameters:
value- The burstPeriodMs to set.- Returns:
- This builder for chaining.
-
clearBurstPeriodMs
* A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket. The rate at which the bucket "drains" is set by the throttles, and this duration sets how long that rate must be sustained to empty a "full" bucket. That combination (calculated as the product of this value and the least common multiple of the `milliOpsPerSec` values for all throttle groups) determines the maximum amount of operations this bucket can "hold". <p> The calculated capacity of this bucket MUST NOT exceed `9,223,372,036,854`.
uint64 burstPeriodMs = 2;- Returns:
- This builder for chaining.
-
getThrottleGroupsList
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3;- Specified by:
getThrottleGroupsListin interfaceThrottleBucketOrBuilder
-
getThrottleGroupsCount
public int getThrottleGroupsCount()* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3;- Specified by:
getThrottleGroupsCountin interfaceThrottleBucketOrBuilder
-
getThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3;- Specified by:
getThrottleGroupsin interfaceThrottleBucketOrBuilder
-
setThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
setThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
addThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
addThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
addThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
addThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
addAllThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
clearThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
removeThrottleGroups
* A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket. <p> This list MUST contain at least one entry.
repeated .proto.ThrottleGroup throttleGroups = 3; -
getHighVolume
public boolean getHighVolume()* If set to true, this bucket is used for high-volume throttles.
bool high_volume = 4;- Specified by:
getHighVolumein interfaceThrottleBucketOrBuilder- Returns:
- The highVolume.
-
setHighVolume
* If set to true, this bucket is used for high-volume throttles.
bool high_volume = 4;- Parameters:
value- The highVolume to set.- Returns:
- This builder for chaining.
-
clearHighVolume
* If set to true, this bucket is used for high-volume throttles.
bool high_volume = 4;- Returns:
- This builder for chaining.
-