Package io.grpc.util
Class OutlierDetectionLoadBalancer.EndpointTrackerMap
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingMap<Set<SocketAddress>,OutlierDetectionLoadBalancer.EndpointTracker>
io.grpc.util.OutlierDetectionLoadBalancer.EndpointTrackerMap
- All Implemented Interfaces:
Map<Set<SocketAddress>,OutlierDetectionLoadBalancer.EndpointTracker>
- Enclosing class:
OutlierDetectionLoadBalancer
static class OutlierDetectionLoadBalancer.EndpointTrackerMap
extends com.google.common.collect.ForwardingMap<Set<SocketAddress>,OutlierDetectionLoadBalancer.EndpointTracker>
Maintains a mapping from endpoint (a set of addresses) to their trackers.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ForwardingMap
com.google.common.collect.ForwardingMap.StandardEntrySet, com.google.common.collect.ForwardingMap.StandardKeySet, com.google.common.collect.ForwardingMap.StandardValues -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Set<SocketAddress>, OutlierDetectionLoadBalancer.EndpointTracker> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidWhen OD gets disabled we need to uneject any subchannels that may have been ejected and to reset the ejection time multiplier.delegate()(package private) doubleHow many percent of the addresses have been ejected.(package private) voidmaybeUnejectOutliers(Long detectionTimerStartNanos) At the end of a timer run we need to decrement the ejection time multiplier for trackers that don't have ejected subchannels and uneject ones that have spent the maximum ejection time allowed.(package private) voidputNewTrackers(OutlierDetectionLoadBalancer.OutlierDetectionLoadBalancerConfig config, Set<Set<SocketAddress>> endpoints) Adds a new tracker for every given address.(package private) voidResets the call counters for all the trackers in the map.(package private) voidSwaps the active and inactive counters for each tracker.(package private) voidMethods inherited from class com.google.common.collect.ForwardingMap
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, valuesMethods inherited from class com.google.common.collect.ForwardingObject
toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
trackerMap
-
-
Constructor Details
-
EndpointTrackerMap
EndpointTrackerMap()
-
-
Method Details
-
delegate
- Specified by:
delegatein classcom.google.common.collect.ForwardingMap<Set<SocketAddress>,OutlierDetectionLoadBalancer.EndpointTracker>
-
updateTrackerConfigs
-
putNewTrackers
void putNewTrackers(OutlierDetectionLoadBalancer.OutlierDetectionLoadBalancerConfig config, Set<Set<SocketAddress>> endpoints) Adds a new tracker for every given address. -
resetCallCounters
void resetCallCounters()Resets the call counters for all the trackers in the map. -
cancelTracking
void cancelTracking()When OD gets disabled we need to uneject any subchannels that may have been ejected and to reset the ejection time multiplier. -
swapCounters
void swapCounters()Swaps the active and inactive counters for each tracker. -
maybeUnejectOutliers
At the end of a timer run we need to decrement the ejection time multiplier for trackers that don't have ejected subchannels and uneject ones that have spent the maximum ejection time allowed. -
ejectionPercentage
double ejectionPercentage()How many percent of the addresses have been ejected.
-