Class TopologyInfo
java.lang.Object
org.infinispan.client.hotrod.impl.TopologyInfo
Maintains topology information about caches.
- Author:
- gustavonalle, Dan Berindei
-
Constructor Summary
ConstructorDescriptionTopologyInfo
(Configuration configuration, org.infinispan.client.hotrod.impl.topology.ClusterInfo clusterInfo) -
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.client.hotrod.impl.consistenthash.SegmentConsistentHash
createConsistentHash
(int numSegments, short hashFunctionVersion, SocketAddress[][] segmentOwners) void
forEachCache
(BiConsumer<WrappedBytes, org.infinispan.client.hotrod.impl.topology.CacheInfo> action) org.infinispan.client.hotrod.impl.topology.CacheInfo
getCacheInfo
(WrappedBytes cacheName) getCacheTopologyInfo
(byte[] cacheName) org.infinispan.client.hotrod.impl.topology.ClusterInfo
org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactory
org.infinispan.client.hotrod.impl.topology.CacheInfo
getOrCreateCacheInfo
(WrappedBytes cacheName) getPrimarySegmentsByServer
(byte[] cacheName) getServers
(WrappedBytes cacheName) int
void
reset
(WrappedBytes cacheName) Reset a single ache to the initial server list.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.void
updateCacheInfo
(WrappedBytes cacheName, org.infinispan.client.hotrod.impl.topology.CacheInfo oldCacheInfo, org.infinispan.client.hotrod.impl.topology.CacheInfo newCacheInfo)
-
Constructor Details
-
TopologyInfo
public TopologyInfo(Configuration configuration, org.infinispan.client.hotrod.impl.topology.ClusterInfo clusterInfo)
-
-
Method Details
-
getPrimarySegmentsByServer
-
getServers
-
getAllServers
-
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
-
getCacheInfo
-
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
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)
-