Home
last modified time | relevance | path

Searched refs:maxTokens (Results 1 – 2 of 2) sorted by relevance

/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DRetriableStream.java924 final int maxTokens; field in RetriableStream.Throttle
938 Throttle(float maxTokens, float tokenRatio) { in Throttle() argument
941 this.maxTokens = (int) (maxTokens * THREE_DECIMAL_PLACES_SCALE_UP); in Throttle()
942 this.threshold = this.maxTokens / 2; in Throttle()
943 tokenCount.set(this.maxTokens); in Throttle()
975 if (currentCount == maxTokens) { in onSuccess()
979 boolean updated = tokenCount.compareAndSet(currentCount, Math.min(incremented, maxTokens)); in onSuccess()
995 return maxTokens == that.maxTokens && tokenRatio == that.tokenRatio; in equals()
1000 return Objects.hashCode(maxTokens, tokenRatio); in hashCode()
DServiceConfigUtil.java93 float maxTokens = getDouble(throttling, "maxTokens").floatValue(); in getThrottlePolicy() local
95 checkState(maxTokens > 0f, "maxToken should be greater than zero"); in getThrottlePolicy()
97 return new Throttle(maxTokens, tokenRatio); in getThrottlePolicy()