Class CacheInfo
- java.lang.Object
-
- org.infinispan.hotrod.impl.topology.CacheInfo
-
public class CacheInfo extends Object
Holds all the cluster topology information the client has for a single cache.Each segment is mapped to a single server, even though the Hot Rod protocol and
ConsistentHashimplementations allow more than one owner.- Since:
- 14.0
-
-
Constructor Summary
Constructors Constructor Description CacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName, FailoverRequestBalancingStrategy balancer, int topologyAge, List<InetSocketAddress> servers, ClientIntelligence intelligence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FailoverRequestBalancingStrategygetBalancer()StringgetCacheName()CacheTopologyInfogetCacheTopologyInfo()AtomicReference<ClientTopology>getClientTopologyRef()ConsistentHashgetConsistentHash()intgetNumSegments()Map<SocketAddress,Set<Integer>>getPrimarySegments()List<InetSocketAddress>getServers()intgetTopologyAge()intgetTopologyId()voidupdateBalancerServers()voidupdateClientTopologyRef()CacheInfowithNewHash(int topologyAge, int topologyId, List<InetSocketAddress> servers, ConsistentHash consistentHash, int numSegments)CacheInfowithNewServers(int topologyAge, int topologyId, List<InetSocketAddress> servers)CacheInfowithNewServers(int topologyAge, int topologyId, List<InetSocketAddress> servers, ClientIntelligence intelligence)
-
-
-
Constructor Detail
-
CacheInfo
public CacheInfo(org.infinispan.commons.marshall.WrappedBytes cacheName, FailoverRequestBalancingStrategy balancer, int topologyAge, List<InetSocketAddress> servers, ClientIntelligence intelligence)
-
-
Method Detail
-
updateBalancerServers
public void updateBalancerServers()
-
withNewServers
public CacheInfo withNewServers(int topologyAge, int topologyId, List<InetSocketAddress> servers)
-
withNewServers
public CacheInfo withNewServers(int topologyAge, int topologyId, List<InetSocketAddress> servers, ClientIntelligence intelligence)
-
withNewHash
public CacheInfo withNewHash(int topologyAge, int topologyId, List<InetSocketAddress> servers, ConsistentHash consistentHash, int numSegments)
-
getCacheName
public String getCacheName()
-
getTopologyAge
public int getTopologyAge()
-
getBalancer
public FailoverRequestBalancingStrategy getBalancer()
-
getNumSegments
public int getNumSegments()
-
getTopologyId
public int getTopologyId()
-
getClientTopologyRef
public AtomicReference<ClientTopology> getClientTopologyRef()
-
getServers
public List<InetSocketAddress> getServers()
-
getPrimarySegments
public Map<SocketAddress,Set<Integer>> getPrimarySegments()
-
getConsistentHash
public ConsistentHash getConsistentHash()
-
getCacheTopologyInfo
public CacheTopologyInfo getCacheTopologyInfo()
-
updateClientTopologyRef
public void updateClientTopologyRef()
-
-