Searched refs:maxTokens (Results 1 – 2 of 2) sorted by relevance
924 final int maxTokens; field in RetriableStream.Throttle938 Throttle(float maxTokens, float tokenRatio) { in Throttle() argument941 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()
93 float maxTokens = getDouble(throttling, "maxTokens").floatValue(); in getThrottlePolicy() local95 checkState(maxTokens > 0f, "maxToken should be greater than zero"); in getThrottlePolicy()97 return new Throttle(maxTokens, tokenRatio); in getThrottlePolicy()