public final class TopologyInfo extends Object
Constructor and Description |
---|
TopologyInfo(AtomicInteger topologyId,
Collection<SocketAddress> initialServers,
Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
AtomicInteger |
createTopologyId(byte[] cacheName,
int topologyId) |
CacheTopologyInfo |
getCacheTopologyInfo(byte[] cacheName) |
ConsistentHash |
getConsistentHash(byte[] cacheName) |
ConsistentHashFactory |
getConsistentHashFactory() |
Optional<SocketAddress> |
getHashAwareServer(Object key,
byte[] cacheName) |
Map<SocketAddress,Set<Integer>> |
getPrimarySegmentsByServer(byte[] cacheName) |
Collection<SocketAddress> |
getServers() |
Collection<SocketAddress> |
getServers(WrappedByteArray cacheName) |
int |
getTopologyId(byte[] cacheName) |
boolean |
isTopologyValid(byte[] cacheName) |
void |
setAllTopologyIds(int newTopologyId) |
void |
setTopologyId(byte[] cacheName,
int topologyId) |
void |
updateServers(byte[] cacheName,
Collection<SocketAddress> updatedServers) |
void |
updateTopology(Map<SocketAddress,Set<Integer>> servers2Hash,
int numKeyOwners,
short hashFunctionVersion,
int hashSpace,
byte[] cacheName,
AtomicInteger topologyId) |
void |
updateTopology(SocketAddress[][] segmentOwners,
int numSegments,
short hashFunctionVersion,
byte[] cacheName,
AtomicInteger topologyId) |
public TopologyInfo(AtomicInteger topologyId, Collection<SocketAddress> initialServers, Configuration configuration)
public Map<SocketAddress,Set<Integer>> getPrimarySegmentsByServer(byte[] cacheName)
public Collection<SocketAddress> getServers(WrappedByteArray cacheName)
public Collection<SocketAddress> getServers()
public void updateTopology(Map<SocketAddress,Set<Integer>> servers2Hash, int numKeyOwners, short hashFunctionVersion, int hashSpace, byte[] cacheName, AtomicInteger topologyId)
public void updateTopology(SocketAddress[][] segmentOwners, int numSegments, short hashFunctionVersion, byte[] cacheName, AtomicInteger topologyId)
public Optional<SocketAddress> getHashAwareServer(Object key, byte[] cacheName)
public boolean isTopologyValid(byte[] cacheName)
public void updateServers(byte[] cacheName, Collection<SocketAddress> updatedServers)
public ConsistentHash getConsistentHash(byte[] cacheName)
public ConsistentHashFactory getConsistentHashFactory()
public AtomicInteger createTopologyId(byte[] cacheName, int topologyId)
public void setTopologyId(byte[] cacheName, int topologyId)
public void setAllTopologyIds(int newTopologyId)
public int getTopologyId(byte[] cacheName)
public CacheTopologyInfo getCacheTopologyInfo(byte[] cacheName)
Copyright © 2021 JBoss by Red Hat. All rights reserved.