Package org.infinispan.hotrod.impl.cache
Class TopologyInfo
java.lang.Object
org.infinispan.hotrod.impl.cache.TopologyInfo
Maintains topology information about caches.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConsistentHash(int numSegments, short hashFunctionVersion, SocketAddress[][] segmentOwners) voidforEachCache(BiConsumer<org.infinispan.commons.marshall.WrappedBytes, CacheInfo> action) getCacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName) getCacheTopologyInfo(byte[] cacheName) getOrCreateCacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName) getPrimarySegmentsByServer(byte[] cacheName) getServers(org.infinispan.commons.marshall.WrappedBytes cacheName) intvoidreset(org.infinispan.commons.marshall.WrappedBytes cacheName) Reset a single ache to the initial server list.voidswitchCluster(ClusterInfo newCluster) Switch to another cluster and update the topologies of all caches with its initial server list.voidupdateCacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName, CacheInfo oldCacheInfo, CacheInfo newCacheInfo)
-
Constructor Details
-
TopologyInfo
-
-
Method Details
-
getPrimarySegmentsByServer
-
getServers
-
getAllServers
-
createConsistentHash
public SegmentConsistentHash createConsistentHash(int numSegments, short hashFunctionVersion, SocketAddress[][] segmentOwners) -
getConsistentHashFactory
-
getCacheTopologyInfo
-
getCacheInfo
-
getOrCreateCacheInfo
-
switchCluster
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
-
getTopologyAge
public int getTopologyAge() -
updateCacheInfo
-
forEachCache
-