Class TopologyInfo


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

      • TopologyInfo

        public TopologyInfo​(Configuration configuration,
                            org.infinispan.client.hotrod.impl.topology.ClusterInfo clusterInfo)
    • Method Detail

      • createConsistentHash

        public org.infinispan.client.hotrod.impl.consistenthash.SegmentConsistentHash createConsistentHash​(int numSegments,
                                                                                                           short hashFunctionVersion,
                                                                                                           SocketAddress[][] segmentOwners)
      • getConsistentHashFactory

        public org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactory getConsistentHashFactory()
      • getCacheTopologyInfo

        public CacheTopologyInfo getCacheTopologyInfo​(byte[] cacheName)
      • getCacheInfo

        public org.infinispan.client.hotrod.impl.topology.CacheInfo getCacheInfo​(WrappedBytes cacheName)
      • getOrCreateCacheInfo

        public org.infinispan.client.hotrod.impl.topology.CacheInfo getOrCreateCacheInfo​(WrappedBytes cacheName)
      • switchCluster

        public void switchCluster​(org.infinispan.client.hotrod.impl.topology.ClusterInfo newCluster)
        Switch to another cluster and update the topologies of all caches with its initial server list.
      • reset

        public void reset​(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 org.infinispan.client.hotrod.impl.topology.ClusterInfo getCluster()
      • getTopologyAge

        public int getTopologyAge()
      • updateCacheInfo

        public void updateCacheInfo​(WrappedBytes cacheName,
                                    org.infinispan.client.hotrod.impl.topology.CacheInfo oldCacheInfo,
                                    org.infinispan.client.hotrod.impl.topology.CacheInfo newCacheInfo)
      • forEachCache

        public void forEachCache​(BiConsumer<WrappedBytes,​org.infinispan.client.hotrod.impl.topology.CacheInfo> action)