public class InVMConnector extends AbstractConnector
Modifier and Type | Field and Description |
---|---|
static Map<String,Object> |
DEFAULT_CONFIG |
protected OrderedExecutorFactory |
executorFactory |
static boolean |
failOnCreateConnection |
protected int |
id |
static int |
numberOfFailures |
configuration
Constructor and Description |
---|
InVMConnector(Map<String,Object> configuration,
BufferHandler handler,
ClientConnectionLifeCycleListener listener,
Executor closeExecutor,
Executor threadPool,
ClientProtocolManager protocolManager) |
Modifier and Type | Method and Description |
---|---|
void |
close()
closes the connector
|
Connection |
createConnection()
Create and return a connection from this connector.
|
void |
disconnect(String connectionID) |
Acceptor |
getAcceptor() |
BufferHandler |
getHandler() |
protected Connection |
internalCreateConnection(BufferHandler handler,
ClientConnectionLifeCycleListener listener,
Executor serverExecutor) |
boolean |
isEquivalent(Map<String,Object> configuration)
If the configuration is equivalent to this connector, which means
if the parameter configuration is used to create a connection to a target
node, it will be the same node as of the connections made with this connector.
|
boolean |
isStarted()
returns true if the connector is started, oterwise false.
|
static void |
resetFailures() |
static void |
resetThreadPool() |
void |
start()
starts the connector
|
public static volatile boolean failOnCreateConnection
public static volatile int numberOfFailures
protected final int id
protected final OrderedExecutorFactory executorFactory
public InVMConnector(Map<String,Object> configuration, BufferHandler handler, ClientConnectionLifeCycleListener listener, Executor closeExecutor, Executor threadPool, ClientProtocolManager protocolManager)
public static void resetFailures()
public static void resetThreadPool()
public Acceptor getAcceptor()
public void close()
Connector
public boolean isStarted()
Connector
public Connection createConnection()
Connector
This method must NOT throw an exception if it fails to create the connection (e.g. network is not available), in this case it MUST return null
public void start()
Connector
public BufferHandler getHandler()
public void disconnect(String connectionID)
protected Connection internalCreateConnection(BufferHandler handler, ClientConnectionLifeCycleListener listener, Executor serverExecutor)
public boolean isEquivalent(Map<String,Object> configuration)
Connector
Copyright © 2017 JBoss by Red Hat. All rights reserved.