@InterfaceAudience.Private final class AsyncRegionLocatorHelper extends Object
| Modifier and Type | Field and Description | 
|---|---|
| private static org.slf4j.Logger | LOG | 
| Modifier | Constructor and Description | 
|---|---|
| private  | AsyncRegionLocatorHelper() | 
| Modifier and Type | Method and Description | 
|---|---|
| (package private) static boolean | canUpdateOnError(HRegionLocation loc,
                HRegionLocation oldLoc) | 
| (package private) static RegionLocations | createRegionLocations(HRegionLocation loc) | 
| (package private) static boolean | isGood(RegionLocations locs,
      int replicaId) | 
| (package private) static RegionLocations | removeRegionLocation(RegionLocations oldLocs,
                    int replicaId)Create a new  RegionLocationsbased on the givenoldLocs, and remove the
 location for the givenreplicaId. | 
| (package private) static RegionLocations | replaceRegionLocation(RegionLocations oldLocs,
                     HRegionLocation loc)Create a new  RegionLocationsbased on the givenoldLocs, and replace the
 location for the givenreplicaIdwith the givenloc. | 
| (package private) static void | updateCachedLocationOnError(HRegionLocation loc,
                           Throwable exception,
                           Function<HRegionLocation,HRegionLocation> cachedLocationSupplier,
                           Consumer<HRegionLocation> addToCache,
                           Consumer<HRegionLocation> removeFromCache,
                           MetricsConnection metrics) | 
private static final org.slf4j.Logger LOG
private AsyncRegionLocatorHelper()
static boolean canUpdateOnError(HRegionLocation loc, HRegionLocation oldLoc)
static void updateCachedLocationOnError(HRegionLocation loc, Throwable exception, Function<HRegionLocation,HRegionLocation> cachedLocationSupplier, Consumer<HRegionLocation> addToCache, Consumer<HRegionLocation> removeFromCache, MetricsConnection metrics)
static RegionLocations createRegionLocations(HRegionLocation loc)
static RegionLocations replaceRegionLocation(RegionLocations oldLocs, HRegionLocation loc)
RegionLocations based on the given oldLocs, and replace the
 location for the given replicaId with the given loc.
 
 All the RegionLocations in async locator related class are immutable because we want to
 access them concurrently, so here we need to create a new one, instead of calling
 RegionLocations.updateLocation(HRegionLocation, boolean, boolean).static RegionLocations removeRegionLocation(RegionLocations oldLocs, int replicaId)
RegionLocations based on the given oldLocs, and remove the
 location for the given replicaId.
 
 All the RegionLocations in async locator related class are immutable because we want to
 access them concurrently, so here we need to create a new one, instead of calling
 RegionLocations.remove(int).static boolean isGood(RegionLocations locs, int replicaId)
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.