@ThreadSafe public class TcpTransportFactory extends Object implements TransportFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
TcpTransportFactory.ClusterSwitchStatus |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CLUSTER_NAME |
| Constructor and Description |
|---|
TcpTransportFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkServersAlive(Collection<SocketAddress> servers) |
AtomicInteger |
createTopologyId(byte[] cacheName) |
void |
destroy() |
Transport |
getAddressTransport(SocketAddress server) |
RequestBalancingStrategy |
getBalancer(byte[] cacheName)
Note that the returned
RequestBalancingStrategy may not be thread-safe. |
CacheTopologyInfo |
getCacheTopologyInfo(byte[] cacheName) |
org.apache.commons.pool.impl.GenericKeyedObjectPool<SocketAddress,TcpTransport> |
getConnectionPool() |
int |
getConnectTimeout() |
ConsistentHash |
getConsistentHash(byte[] cacheName)
Note that the returned
ConsistentHash may not be thread-safe. |
ConsistentHashFactory |
getConsistentHashFactory() |
String |
getCurrentClusterName() |
Marshaller |
getMarshaller() |
int |
getMaxRetries() |
Collection<SocketAddress> |
getServers() |
SocketAddress |
getSocketAddress(Object key,
byte[] cacheName) |
int |
getSoTimeout() |
SSLContext |
getSSLContext() |
int |
getTopologyAge() |
int |
getTopologyId(byte[] cacheName) |
Transport |
getTransport(Object key,
Set<SocketAddress> failedServers,
byte[] cacheName) |
Transport |
getTransport(Set<SocketAddress> failedServers,
byte[] cacheName) |
void |
invalidateTransport(SocketAddress serverAddress,
Transport transport) |
boolean |
isTcpKeepAlive() |
boolean |
isTcpNoDelay() |
void |
releaseTransport(Transport transport) |
void |
reset(byte[] cacheName) |
void |
start(Codec codec,
Configuration configuration,
AtomicInteger defaultCacheTopologyId,
ClientListenerNotifier listenerNotifier) |
boolean |
switchToCluster(String clusterName) |
TcpTransportFactory.ClusterSwitchStatus |
trySwitchCluster(String failedClusterName,
byte[] cacheName) |
void |
updateHashFunction(Map<SocketAddress,Set<Integer>> servers2Hash,
int numKeyOwners,
short hashFunctionVersion,
int hashSpace,
byte[] cacheName,
AtomicInteger topologyId) |
void |
updateHashFunction(SocketAddress[][] segmentOwners,
int numSegments,
short hashFunctionVersion,
byte[] cacheName,
AtomicInteger topologyId) |
void |
updateServers(Collection<SocketAddress> newServers,
byte[] cacheName,
boolean quiet) |
public static final String DEFAULT_CLUSTER_NAME
public void start(Codec codec, Configuration configuration, AtomicInteger defaultCacheTopologyId, ClientListenerNotifier listenerNotifier)
start in interface TransportFactorypublic void destroy()
destroy in interface TransportFactorypublic CacheTopologyInfo getCacheTopologyInfo(byte[] cacheName)
getCacheTopologyInfo in interface TransportFactorypublic void updateHashFunction(Map<SocketAddress,Set<Integer>> servers2Hash, int numKeyOwners, short hashFunctionVersion, int hashSpace, byte[] cacheName, AtomicInteger topologyId)
updateHashFunction in interface TransportFactorypublic void updateHashFunction(SocketAddress[][] segmentOwners, int numSegments, short hashFunctionVersion, byte[] cacheName, AtomicInteger topologyId)
updateHashFunction in interface TransportFactorypublic Transport getTransport(Set<SocketAddress> failedServers, byte[] cacheName)
getTransport in interface TransportFactorypublic Transport getAddressTransport(SocketAddress server)
getAddressTransport in interface TransportFactorypublic SocketAddress getSocketAddress(Object key, byte[] cacheName)
getSocketAddress in interface TransportFactorypublic Transport getTransport(Object key, Set<SocketAddress> failedServers, byte[] cacheName)
getTransport in interface TransportFactorypublic void releaseTransport(Transport transport)
releaseTransport in interface TransportFactorypublic void invalidateTransport(SocketAddress serverAddress, Transport transport)
invalidateTransport in interface TransportFactorypublic void updateServers(Collection<SocketAddress> newServers, byte[] cacheName, boolean quiet)
updateServers in interface TransportFactorypublic Collection<SocketAddress> getServers()
public ConsistentHash getConsistentHash(byte[] cacheName)
ConsistentHash may not be thread-safe.getConsistentHash in interface TransportFactorypublic ConsistentHashFactory getConsistentHashFactory()
getConsistentHashFactory in interface TransportFactorypublic boolean isTcpNoDelay()
isTcpNoDelay in interface TransportFactorypublic boolean isTcpKeepAlive()
isTcpKeepAlive in interface TransportFactorypublic int getMaxRetries()
getMaxRetries in interface TransportFactorypublic int getSoTimeout()
getSoTimeout in interface TransportFactorypublic int getConnectTimeout()
getConnectTimeout in interface TransportFactorypublic SSLContext getSSLContext()
getSSLContext in interface TransportFactorypublic void reset(byte[] cacheName)
reset in interface TransportFactorypublic AtomicInteger createTopologyId(byte[] cacheName)
createTopologyId in interface TransportFactorypublic int getTopologyId(byte[] cacheName)
getTopologyId in interface TransportFactorypublic TcpTransportFactory.ClusterSwitchStatus trySwitchCluster(String failedClusterName, byte[] cacheName)
trySwitchCluster in interface TransportFactorypublic boolean checkServersAlive(Collection<SocketAddress> servers)
public Marshaller getMarshaller()
getMarshaller in interface TransportFactorypublic boolean switchToCluster(String clusterName)
switchToCluster in interface TransportFactorypublic String getCurrentClusterName()
getCurrentClusterName in interface TransportFactorypublic int getTopologyAge()
getTopologyAge in interface TransportFactorypublic RequestBalancingStrategy getBalancer(byte[] cacheName)
RequestBalancingStrategy may not be thread-safe.public org.apache.commons.pool.impl.GenericKeyedObjectPool<SocketAddress,TcpTransport> getConnectionPool()
Copyright © 2025 JBoss, a division of Red Hat. All rights reserved.