Class TopologyInfo

java.lang.Object
org.infinispan.client.hotrod.impl.TopologyInfo

@NotThreadSafe public final class TopologyInfo extends Object
Maintains topology information about caches.
Author:
gustavonalle, Dan Berindei
  • Constructor Details

  • Method Details

    • getPrimarySegmentsByServer

      public Map<SocketAddress,Set<Integer>> getPrimarySegmentsByServer(byte[] cacheName)
    • getServers

      public List<InetSocketAddress> getServers(org.infinispan.commons.marshall.WrappedBytes cacheName)
    • getAllServers

      public Collection<InetSocketAddress> getAllServers()
    • createConsistentHash

      public SegmentConsistentHash createConsistentHash(int numSegments, short hashFunctionVersion, SocketAddress[][] segmentOwners)
    • getConsistentHashFactory

      public ConsistentHashFactory getConsistentHashFactory()
    • getCacheTopologyInfo

      public CacheTopologyInfo getCacheTopologyInfo(byte[] cacheName)
    • getCacheInfo

      public CacheInfo getCacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName)
    • getOrCreateCacheInfo

      public CacheInfo getOrCreateCacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName)
    • switchCluster

      public void switchCluster(ClusterInfo newCluster)
      Switch to another cluster and update the topologies of all caches with its initial server list.
    • reset

      public void reset(org.infinispan.commons.marshall.WrappedBytes cacheName)
      Reset a single ache to the initial server list.

      Useful if there are still live servers in the cluster, but all the server in this cache's current topology are unreachable.

    • getCluster

      public ClusterInfo getCluster()
    • getTopologyAge

      public int getTopologyAge()
    • updateCacheInfo

      public void updateCacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName, CacheInfo oldCacheInfo, CacheInfo newCacheInfo)
    • forEachCache

      public void forEachCache(BiConsumer<org.infinispan.commons.marshall.WrappedBytes,CacheInfo> action)