public interface GridTcpRouter
Router allows remote clients to connect to grid without direct access to the network where grid is running. It accepts requests on the same protocol as grid rest server and establish required connection to grid nodes to serve them.
Below is an example on how to start TCP router with non-default configuration.
GridTcpRouterConfiguration cfg = new GridTcpRouterConfiguration(); cfg.setHost("router.appdomain.com"); cfg.setPort(11211); cfg.setServers(Arrays.asList( "node1.appdomain.com:11211", "node2.appdomain.com:11211")); GridRouterFactory.startTcpRouter(cfg);
Note that clients should be specifically configured in order to use router.
Please refer to GridClientConfiguration.getServers()
and
GridClientConfiguration.getRouters()
documentation for more details.
Instances of this interface are managed through GridRouterFactory
.
GridTcpRouterConfiguration
Modifier and Type | Method and Description |
---|---|
GridTcpRouterConfiguration |
configuration()
Returns configuration used to start router.
|
UUID |
id()
Returns router Id.
|
UUID id()
Unique router Ids are automatically generated on router startup.
They are used to control router's lifecycle via GridRouterFactory
.
GridRouterFactory.tcpRouter(UUID)
,
GridRouterFactory.stopTcpRouter(UUID)
GridTcpRouterConfiguration configuration()
GridRouterFactory.startTcpRouter(GridTcpRouterConfiguration)
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017