Interface DomainClient

    • Method Detail

      • getHostControllerNames

        List<String> getHostControllerNames()
        Gets the list of currently running host controllers.
        Returns:
        the names of the host controllers. Will not be null
      • getServerStatuses

        Map<ServerIdentity,​ServerStatus> getServerStatuses()
        Gets a list of all servers known to the domain, along with their current status. Servers associated with host controllers that are currently off line will not be included.
        Returns:
        the servers and their current status. Will not be null
      • startServer

        ServerStatus startServer​(String hostControllerName,
                                 String serverName)
        Starts the given server. Ignored if the server is not stopped.
        Parameters:
        hostControllerName - the name of the host controller responsible for the server
        serverName - the name of the server
        Returns:
        the status of the server following the start. Will not be null
      • stopServer

        ServerStatus stopServer​(String hostControllerName,
                                String serverName,
                                long gracefulShutdownTimeout,
                                TimeUnit timeUnit)
        Stops the given server.
        Parameters:
        hostControllerName - the name of the host controller responsible for the server
        serverName - the name of the server
        gracefulShutdownTimeout - maximum period to wait to allow the server to gracefully handle long running tasks before shutting down, or -1 to shutdown immediately
        timeUnit - time unit in which gracefulShutdownTimeout is expressed
        Returns:
        the status of the server following the stop. Will not be null
      • restartServer

        ServerStatus restartServer​(String hostControllerName,
                                   String serverName,
                                   long gracefulShutdownTimeout,
                                   TimeUnit timeUnit)
        Restarts the given server.
        Parameters:
        hostControllerName - the name of the host controller responsible for the server
        serverName - the name of the server
        gracefulShutdownTimeout - maximum period to wait to allow the server to gracefully handle long running tasks before shutting down, or -1 to shutdown immediately
        timeUnit - time unit in which gracefulShutdownTimeout is expressed
        Returns:
        the status of the server following the restart. Will not be null