java.lang.Object
io.github.bucket4j.Bandwidth
- All Implemented Interfaces:
ComparableByContent<Bandwidth>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SerializationHandle<Bandwidth>static final Stringstatic final long -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forBandwidthstatic BandwidthDeprecated.booleanbooleanequalsByContent(Bandwidth other) longgetId()longlonglonglonginthashCode()booleanhasId()booleanisGready()booleanbooleanbooleanstatic BandwidthDeprecated.toString()Deprecated.withInitialTokens(long initialTokens) Deprecated.
-
Field Details
-
UNDEFINED_ID
-
UNSPECIFIED_TIME_OF_FIRST_REFILL
public static final long UNSPECIFIED_TIME_OF_FIRST_REFILL- See Also:
-
SERIALIZATION_HANDLE
-
-
Method Details
-
builder
Creates a builder forBandwidth- Returns:
- a builder for
Bandwidth
-
simple
Deprecated.This method is deprecated, you should usebuilder() -
classic
Deprecated.This method is deprecated, you should usebuilder() -
withInitialTokens
Deprecated.This method is deprecated, you should useBandwidthBuilder.BandwidthBuilderBuildStage.initialTokens(long) -
withId
Deprecated.This method is deprecated, you should useBandwidthBuilder.BandwidthBuilderBuildStage.id(String) -
isIntervallyAligned
public boolean isIntervallyAligned() -
getTimeOfFirstRefillMillis
public long getTimeOfFirstRefillMillis() -
getCapacity
public long getCapacity() -
getInitialTokens
public long getInitialTokens() -
getRefillPeriodNanos
public long getRefillPeriodNanos() -
getRefillTokens
public long getRefillTokens() -
isUseAdaptiveInitialTokens
public boolean isUseAdaptiveInitialTokens() -
isRefillIntervally
public boolean isRefillIntervally() -
isGready
public boolean isGready() -
getId
-
hasId
public boolean hasId() -
equals
-
hashCode
public int hashCode() -
toString
-
equalsByContent
- Specified by:
equalsByContentin interfaceComparableByContent<Bandwidth>
-