org.infinispan.client.hotrod.impl.transport.tcp
Class TcpTransportFactory

java.lang.Object
  extended by org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory
All Implemented Interfaces:
TransportFactory

public class TcpTransportFactory
extends Object
implements TransportFactory

// TODO: Document this

todo - all methods but start and start can be called from multiple threads, add proper sync

Since:
4.1
Author:
Mircea.Markus@jboss.com

Field Summary
 
Fields inherited from interface org.infinispan.client.hotrod.impl.transport.TransportFactory
CONF_HOTROD_SERVERS
 
Constructor Summary
TcpTransportFactory()
           
 
Method Summary
 void destroy()
           
 ConsistentHash getConsistentHash()
           
 Collection<InetSocketAddress> getServers()
           
 Transport getTransport()
           
 Transport getTransport(byte[] key)
           
 void releaseTransport(Transport transport)
           
 void start(Properties props, Collection<InetSocketAddress> staticConfiguredServers)
           
 void updateHashFunction(LinkedHashMap<InetSocketAddress,Integer> servers2HashCode, int numKeyOwners, short hashFunctionVersion, int hashSpace)
           
 void updateServers(Collection<InetSocketAddress> newServers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpTransportFactory

public TcpTransportFactory()
Method Detail

start

public void start(Properties props,
                  Collection<InetSocketAddress> staticConfiguredServers)
Specified by:
start in interface TransportFactory

destroy

public void destroy()
Specified by:
destroy in interface TransportFactory

updateHashFunction

public void updateHashFunction(LinkedHashMap<InetSocketAddress,Integer> servers2HashCode,
                               int numKeyOwners,
                               short hashFunctionVersion,
                               int hashSpace)
Specified by:
updateHashFunction in interface TransportFactory

getTransport

public Transport getTransport()
Specified by:
getTransport in interface TransportFactory

getTransport

public Transport getTransport(byte[] key)
Specified by:
getTransport in interface TransportFactory

releaseTransport

public void releaseTransport(Transport transport)
Specified by:
releaseTransport in interface TransportFactory

updateServers

public void updateServers(Collection<InetSocketAddress> newServers)
Specified by:
updateServers in interface TransportFactory

getServers

public Collection<InetSocketAddress> getServers()

getConsistentHash

public ConsistentHash getConsistentHash()

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.