public final class GridRouterFactory extends Object
GridTcpRouterConfiguration to set configuration parameters and pass them to
startTcpRouter(GridTcpRouterConfiguration).
See GridTcpRouter for example on how to configure and start embedded router.
IGNITE_HOME/bin/igniterouter.sh or IGNITE_HOME/bin/igniterouter.bat.
They both accept path to a configuration file as first command line argument.
See IGNITE_HOME/config/router/default-router.xml for configuration example.GridTcpRouter| Modifier and Type | Method and Description |
|---|---|
static Collection<GridTcpRouter> |
allTcpRouters()
Returns collection of all currently running TCP routers.
|
static GridTcpRouter |
startTcpRouter(GridTcpRouterConfiguration cfg)
Starts a TCP router with given configuration.
|
static void |
stopAllRouters()
Stops all currently active routers.
|
static void |
stopTcpRouter(UUID tcpRouterId)
Stops particular TCP router.
|
static GridTcpRouter |
tcpRouter(UUID id)
Returns TCP router with the given id.
|
public static GridTcpRouter startTcpRouter(GridTcpRouterConfiguration cfg) throws IgniteCheckedException
Starting router will be assigned a randomly generated UUID which can be obtained
by GridTcpRouter.id() method. Later this instance could be obtained via
tcpRouter(java.util.UUID) method.
cfg - Router configuration.IgniteCheckedException - If router start failed.public static void stopTcpRouter(UUID tcpRouterId)
tcpRouterId - Id of the router to stop.@Nullable public static GridTcpRouter tcpRouter(UUID id)
id - Router Id.null if router not found.public static Collection<GridTcpRouter> allTcpRouters()
GridTcpRouters.public static void stopAllRouters()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018