Class TopologyInfo
java.lang.Object
org.infinispan.client.hotrod.impl.TopologyInfo
Maintains topology information about caches.
- Author:
- gustavonalle, Dan Berindei
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateConsistentHash
(int numSegments, short hashFunctionVersion, SocketAddress[][] segmentOwners) void
forEachCache
(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) int
void
reset
(org.infinispan.commons.marshall.WrappedBytes cacheName) Reset a single ache to the initial server list.void
switchCluster
(ClusterInfo newCluster) Switch to another cluster and update the topologies of all caches with its initial server list.void
updateCacheInfo
(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
-