Class KeyRangeCache

java.lang.Object
com.google.cloud.spanner.spi.v1.KeyRangeCache

@InternalApi public final class KeyRangeCache extends Object
Cache for routing information used by location-aware routing.
  • Constructor Details

  • Method Details

    • addRanges

      public void addRanges(CacheUpdate cacheUpdate)
      Applies cache updates. Tablets are processed inside group updates.
    • fillRoutingHint

      public ChannelEndpoint fillRoutingHint(boolean preferLeader, KeyRangeCache.RangeMode rangeMode, DirectedReadOptions directedReadOptions, RoutingHint.Builder hintBuilder)
      Fills routing hint and returns the server to use, or null if no routing decision can be made.
    • clear

      public void clear()
    • size

      public int size()
    • shrinkTo

      public void shrinkTo(int newSize)
    • debugString

      public String debugString()