Class GridRouterFactory


  • public final class GridRouterFactory
    extends Object
    This factory is responsible for router lifecycle management. All router should be started, accessed and stopped through this factory.

    Embedding router

    You can use GridTcpRouterConfiguration to set configuration parameters and pass them to startTcpRouter(GridTcpRouterConfiguration).

    See GridTcpRouter for example on how to configure and start embedded router.

    Standalone router startup

    Alternatively you can run routers as a standalone processes by executing 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.
    See Also:
    GridTcpRouter
    • Method Detail

      • stopTcpRouter

        public static void stopTcpRouter​(UUID tcpRouterId)
        Stops particular TCP router.
        Parameters:
        tcpRouterId - Id of the router to stop.
      • tcpRouter

        @Nullable
        public static @Nullable GridTcpRouter tcpRouter​(UUID id)
        Returns TCP router with the given id.
        Parameters:
        id - Router Id.
        Returns:
        Router with the given id or null if router not found.
      • allTcpRouters

        public static Collection<GridTcpRouter> allTcpRouters()
        Returns collection of all currently running TCP routers.
        Returns:
        Collection of currently running GridTcpRouters.
      • stopAllRouters

        public static void stopAllRouters()
        Stops all currently active routers.