Class ForkedServer


  • public class ForkedServer
    extends Object
    Forked server starts the server using batch scripts from the Infinispan Server distribution to start the server. The driver uses REST API to shutdown the server. Server log is cleaned before start and is not configurable. Appends random UUID for server process to identify the corresponding child Java process of the server. FIXME: Add proper Windows platform support. FIXME: The server.log file must be present before starting the server as the monitoring process is pointed to it - - groundwork for making the purging of the log directory optional.
    Since:
    11.0
    Author:
    Gustavo Lira <glira@redhat.com>, Radoslav Husar
    • Field Detail

      • TIMEOUT_SECONDS

        public static final int TIMEOUT_SECONDS
      • DEFAULT_SINGLE_PORT

        public static final Integer DEFAULT_SINGLE_PORT
    • Constructor Detail

      • ForkedServer

        public ForkedServer​(String serverHome)
    • Method Detail

      • setServerConfiguration

        public ForkedServer setServerConfiguration​(String serverConfiguration)
      • setPortsOffset

        public ForkedServer setPortsOffset​(int numServer)
      • cleanup

        public void cleanup()
      • getServerLib

        public File getServerLib()
      • getPid

        public long getPid()
        Returns the process ID of the Java process as opposed to the pid of the shell script which started the actual Java process. The process is matched containing the randomized UUID.
        Returns:
        process ID (pid) of the server's Java process.