public class DefaultConnectionConfig extends Object implements ConnectionConfig
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultConnectionConfig.DefaultSource
Default source implementation.
|
static class |
DefaultConnectionConfig.DefaultTarget
Default target implementation.
|
ConnectionConfig.Source, ConnectionConfig.TargetCONNECTION_HOOKS, CONNECTION_SELECTOR, CONNECTION_SOURCE, CONNECTION_TARGET| Constructor and Description |
|---|
DefaultConnectionConfig() |
DefaultConnectionConfig(String source,
String target,
NetworkConfig network) |
DefaultConnectionConfig(String source,
String target,
Selector selector,
NetworkConfig network) |
DefaultConnectionConfig(String source,
String out,
String target,
String in,
NetworkConfig network) |
DefaultConnectionConfig(String source,
String out,
String target,
String in,
Selector selector,
NetworkConfig network) |
| Modifier and Type | Method and Description |
|---|---|
ConnectionConfig |
addHook(IOHook hook)
Adds an input/output hook to the connection.
|
ConnectionConfig |
allSelect()
Sets an all selector on the connection.
|
ConnectionConfig |
customSelect(Selector selector)
Sets a custom selector on the connection.
|
boolean |
equals(Object other) |
ConnectionConfig |
fairSelect()
Sets a fair selector on the connection.
|
List<IOHook> |
getHooks()
Returns a list of connection hooks.
|
Selector |
getSelector()
Returns the connection selector.
|
ConnectionConfig.Source |
getSource()
Returns the connection source.
|
ConnectionConfig.Target |
getTarget()
Returns the connection target.
|
ConnectionConfig |
hashSelect()
Sets a mod-hash based selector on the connection.
|
ConnectionConfig |
randomSelect()
Sets a random selector on the connection.
|
ConnectionConfig |
roundSelect()
Sets a round-robin selector on the connection.
|
ConnectionConfig |
setSelector(Selector selector)
Sets the connection selector.
|
public DefaultConnectionConfig()
public DefaultConnectionConfig(String source, String target, NetworkConfig network)
public DefaultConnectionConfig(String source, String target, Selector selector, NetworkConfig network)
public DefaultConnectionConfig(String source, String out, String target, String in, NetworkConfig network)
public ConnectionConfig.Source getSource()
ConnectionConfiggetSource in interface ConnectionConfigpublic ConnectionConfig.Target getTarget()
ConnectionConfiggetTarget in interface ConnectionConfigpublic ConnectionConfig addHook(IOHook hook)
ConnectionConfigaddHook in interface ConnectionConfighook - The hook to add.public List<IOHook> getHooks()
ConnectionConfiggetHooks in interface ConnectionConfigpublic Selector getSelector()
ConnectionConfiggetSelector in interface ConnectionConfigpublic ConnectionConfig setSelector(Selector selector)
ConnectionConfigsetSelector in interface ConnectionConfigselector - The selector with which to select individual connections.public ConnectionConfig roundSelect()
ConnectionConfigroundSelect in interface ConnectionConfigpublic ConnectionConfig randomSelect()
ConnectionConfigrandomSelect in interface ConnectionConfigpublic ConnectionConfig hashSelect()
ConnectionConfighashSelect in interface ConnectionConfigpublic ConnectionConfig fairSelect()
ConnectionConfigfairSelect in interface ConnectionConfigpublic ConnectionConfig allSelect()
ConnectionConfigallSelect in interface ConnectionConfigpublic ConnectionConfig customSelect(Selector selector)
ConnectionConfigcustomSelect in interface ConnectionConfigselector - The custom selector to set.Copyright © 2013-2014. All Rights Reserved.