Class ChannelFactory


  • @ThreadSafe
    public class ChannelFactory
    extends Object
    Central component providing connections to remote server. Most of the code originates in TcpTransportFactory.
    Since:
    9.3
    • Constructor Detail

      • ChannelFactory

        public ChannelFactory()
    • Method Detail

      • destroy

        public void destroy()
      • getCacheTopologyInfo

        public CacheTopologyInfo getCacheTopologyInfo​(byte[] cacheName)
      • updateHashFunction

        public void updateHashFunction​(Map<SocketAddress,​Set<Integer>> servers2Hash,
                                       int numKeyOwners,
                                       short hashFunctionVersion,
                                       int hashSpace,
                                       byte[] cacheName,
                                       AtomicInteger topologyId)
      • updateHashFunction

        public void updateHashFunction​(SocketAddress[][] segmentOwners,
                                       int numSegments,
                                       short hashFunctionVersion,
                                       byte[] cacheName,
                                       AtomicInteger topologyId)
      • releaseChannel

        public void releaseChannel​(io.netty.channel.Channel channel)
      • updateServers

        public void updateServers​(Collection<SocketAddress> newServers,
                                  byte[] cacheName,
                                  boolean quiet)
      • getConsistentHash

        public ConsistentHash getConsistentHash​(byte[] cacheName)
        Note that the returned ConsistentHash may not be thread-safe.
      • isTcpNoDelay

        public boolean isTcpNoDelay()
      • isTcpKeepAlive

        public boolean isTcpKeepAlive()
      • getMaxRetries

        public int getMaxRetries()
      • reset

        public void reset​(byte[] cacheName)
      • createTopologyId

        public AtomicInteger createTopologyId​(byte[] cacheName)
      • getTopologyId

        public int getTopologyId​(byte[] cacheName)
      • getMarshaller

        public org.infinispan.commons.marshall.Marshaller getMarshaller()
      • switchToCluster

        public boolean switchToCluster​(String clusterName)
      • getCurrentClusterName

        public String getCurrentClusterName()
      • getTopologyAge

        public int getTopologyAge()
      • getBalancer

        public FailoverRequestBalancingStrategy getBalancer​(byte[] cacheName)
        Note that the returned RequestBalancingStrategy may not be thread-safe.
      • socketTimeout

        public int socketTimeout()
      • getNumActive

        public int getNumActive​(SocketAddress address)
      • getNumActive

        public int getNumActive()
      • getNumIdle

        public int getNumIdle()