Class TopologyInfo
java.lang.Object
org.infinispan.client.hotrod.impl.TopologyInfo
Maintains topology information about caches.
- Author:
- gustavonalle, Dan Berindei
-
Constructor Summary
ConstructorsConstructorDescriptionTopologyInfo(Configuration configuration, org.infinispan.client.hotrod.impl.topology.ClusterInfo clusterInfo) -
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.client.hotrod.impl.consistenthash.SegmentConsistentHashcreateConsistentHash(int numSegments, short hashFunctionVersion, SocketAddress[][] segmentOwners) voidforEachCache(BiConsumer<String, org.infinispan.client.hotrod.impl.topology.CacheInfo> action) org.infinispan.client.hotrod.impl.topology.CacheInfogetCacheInfo(String cacheName) getCacheTopologyInfo(String cacheName) org.infinispan.client.hotrod.impl.topology.ClusterInfoorg.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactoryorg.infinispan.client.hotrod.impl.topology.CacheInfogetOrCreateCacheInfo(String cacheName) getPrimarySegmentsByServer(String cacheName) getServers(String cacheName) intvoidReset a single ache to the initial server list.voidswitchCluster(org.infinispan.client.hotrod.impl.topology.ClusterInfo newCluster) Switch to another cluster and update the topologies of all caches with its initial server list.voidupdateCacheInfo(String 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
-
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(String cacheName, org.infinispan.client.hotrod.impl.topology.CacheInfo oldCacheInfo, org.infinispan.client.hotrod.impl.topology.CacheInfo newCacheInfo) -
forEachCache
public void forEachCache(BiConsumer<String, org.infinispan.client.hotrod.impl.topology.CacheInfo> action)
-