Class ForkedInfinispanServerDriver

java.lang.Object
org.infinispan.server.test.core.AbstractInfinispanServerDriver
org.infinispan.server.test.core.ForkedInfinispanServerDriver
All Implemented Interfaces:
InfinispanServerDriver

public class ForkedInfinispanServerDriver extends AbstractInfinispanServerDriver
Since:
11.0
Author:
Gustavo Lira <glira@redhat.com>, Radoslav Husar
  • Constructor Details

  • Method Details

    • prepare

      public void prepare(String name)
      Description copied from class: AbstractInfinispanServerDriver
      Prepare a server layout
      Specified by:
      prepare in interface InfinispanServerDriver
      Overrides:
      prepare in class AbstractInfinispanServerDriver
      Parameters:
      name - the name of the server configuration
    • start

      protected void start(String name, File rootDir, File configurationFile)
      Specified by:
      start in class AbstractInfinispanServerDriver
    • stop

      protected void stop()
      Stop whole cluster.
      Specified by:
      stop in class AbstractInfinispanServerDriver
    • stop

      public void stop(int server)
      Stop a specific server
      Parameters:
      server - the index of the server
    • isRunning

      public boolean isRunning(int server)
      Description copied from interface: InfinispanServerDriver
      Determines whether a specific server is running as part of a server configuration
      Parameters:
      server - the
      Returns:
      true if the server is running, false otherwise
    • getServerSocket

      public InetSocketAddress getServerSocket(int server, int port)
      Description copied from interface: InfinispanServerDriver
      Returns an InetSocketAddress for connecting to a specific port on a specific server. The implementation will need to provide a specific mapping (e.g. port offset).
      Parameters:
      server - the index of the server
      port - the service port
      Returns:
      an unresolved InetSocketAddress pointing to the actual running service
    • getServerAddress

      public InetAddress getServerAddress(int server)
      Description copied from interface: InfinispanServerDriver
      Returns an InetAddress that points to a specific server.
      Parameters:
      server - the index of the server
      Returns:
      an InetAddress pointing to the server's address
    • pause

      public void pause(int server)
      Description copied from class: AbstractInfinispanServerDriver
      Pauses the server. Equivalent to kill -SIGSTOP
      Specified by:
      pause in interface InfinispanServerDriver
      Overrides:
      pause in class AbstractInfinispanServerDriver
      Parameters:
      server - the index of the server
    • resume

      public void resume(int server)
      Description copied from interface: InfinispanServerDriver
      Resumes a paused server. Equivalent to kill -SIGCONT
      Parameters:
      server - the index of the server
    • kill

      public void kill(int server)
      Description copied from interface: InfinispanServerDriver
      Forcefully stops a server. Equivalent to kill -SIGKILL
      Parameters:
      server - the index of the server
    • restart

      public void restart(int server)
      Description copied from interface: InfinispanServerDriver
      Restarts a previously stopped server.
      Parameters:
      server - the index of the server
    • restartCluster

      public void restartCluster()
      Description copied from interface: InfinispanServerDriver
      Restarts all of the nodes
    • getJmxConnection

      public MBeanServerConnection getJmxConnection(int server)
      Description copied from interface: InfinispanServerDriver
      Returns a MBeanServerConnection to the specified server
      Parameters:
      server - the index of the server
    • getTimeout

      public int getTimeout()
      Description copied from interface: InfinispanServerDriver
      Returns the amount of time in seconds that we should wait for a server start/stop operation. This may vary depending on the type of driver (embedded, container)
      Returns:
      the number of seconds after which a server start/stop is considered to timeout
    • syncFilesFromServer

      public String syncFilesFromServer(int server, String dir)
      Description copied from interface: InfinispanServerDriver
      Synchronizes files from the server to the local filesystem
      Parameters:
      server - the server
      dir - if relative, the path relative to the server root, otherwise an absolute path
      Returns:
      the path where the data has been synced to
    • syncFilesToServer

      public String syncFilesToServer(int server, String path)