Class EmbeddedInfinispanServerDriver

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

public class EmbeddedInfinispanServerDriver extends AbstractInfinispanServerDriver
Since:
10.0
Author:
Tristan Tarrant <tristan@infinispan.org>
  • Field Details

  • Constructor Details

  • Method Details

    • clusterPortOffset

      protected int clusterPortOffset()
    • start

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

      protected void stop()
      Specified by:
      stop in class AbstractInfinispanServerDriver
    • getServerSocket

      public InetSocketAddress getServerSocket(int serverIndex, 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:
      serverIndex - the index of the server
      port - the service port
      Returns:
      an unresolved InetSocketAddress pointing to the actual running service
    • getServerAddress

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

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

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

      public void stop(int serverIndex)
      Description copied from interface: InfinispanServerDriver
      Gracefully stops a running server
      Parameters:
      serverIndex - the index of the server
    • kill

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

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

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

      public boolean isRunning(int serverIndex)
      Description copied from interface: InfinispanServerDriver
      Determines whether a specific server is running as part of a server configuration
      Parameters:
      serverIndex - the
      Returns:
      true if the server is running, false otherwise
    • 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
    • areCacheViewsComplete

      public static boolean areCacheViewsComplete(List<org.infinispan.manager.EmbeddedCacheManager> cacheManagers, boolean fail)
    • 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)