Package org.infinispan.server.test.core
Interface InfinispanServerDriver
- All Known Implementing Classes:
AbstractInfinispanServerDriver,ContainerInfinispanServerDriver,EmbeddedInfinispanServerDriver,ForkedInfinispanServerDriver
public interface InfinispanServerDriver
- Since:
- 11.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyKeyStore(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder, String certificateName) voidapplyKeyStore(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder, String certificateName, String type, String provider) voidapplyKeyStore(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder, String certificateName) voidapplyKeyStore(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder, String certificateName, String type, String provider) voidapplyTrustStore(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder, String certificateName) voidapplyTrustStore(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder, String certificateName, String type, String provider) voidapplyTrustStore(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder, String certificateName) voidapplyTrustStore(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder, String certificateName, String type, String provider) org.infinispan.client.hotrod.RemoteCacheManagercreateRemoteCacheManager(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder) getCertificateFile(String name) getJmxConnection(int server) Returns aMBeanServerConnectionto the specified servergetServerAddress(int server) Returns an InetAddress that points to a specific server.getServerSocket(int server, int port) Returns an InetSocketAddress for connecting to a specific port on a specific server.org.infinispan.lifecycle.ComponentStatusintReturns the amount of time in seconds that we should wait for a server start/stop operation.booleanisRunning(int server) Determines whether a specific server is running as part of a server configurationvoidkill(int server) Forcefully stops a server.voidpause(int server) Pauses a server.voidPrepares a named server configurationvoidrestart(int server) Restarts a previously stopped server.voidRestarts all of the nodesvoidresume(int server) Resumes a paused server.voidStarts a prepared server configurationvoidstop(int server) Gracefully stops a running servervoidStops a running server configurationsyncFilesFromServer(int server, String dir) Synchronizes files from the server to the local filesystemsyncFilesToServer(int server, String path)
-
Field Details
-
log
static final org.infinispan.util.logging.Log log
-
-
Method Details
-
getStatus
org.infinispan.lifecycle.ComponentStatus getStatus() -
getConfiguration
InfinispanServerTestConfiguration getConfiguration() -
prepare
Prepares a named server configuration- Parameters:
name- the name of the server configuration
-
start
Starts a prepared server configuration- Parameters:
name- the name of the server configuration
-
stop
Stops a running server configuration- Parameters:
name- the name of the server configuration
-
isRunning
boolean isRunning(int server) 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
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 serverport- the service port- Returns:
- an unresolved InetSocketAddress pointing to the actual running service
-
getServerAddress
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
-
getCertificateFile
-
getRootDir
File getRootDir() -
getConfDir
File getConfDir() -
applyKeyStore
void applyKeyStore(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder, String certificateName) -
applyKeyStore
-
applyKeyStore
void applyKeyStore(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder, String certificateName) -
applyKeyStore
-
applyTrustStore
void applyTrustStore(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder, String certificateName) -
applyTrustStore
-
applyTrustStore
void applyTrustStore(org.infinispan.client.rest.configuration.RestClientConfigurationBuilder builder, String certificateName) -
applyTrustStore
-
pause
void pause(int server) Pauses a server. Equivalent to kill -SIGSTOP- Parameters:
server- the index of the server
-
resume
void resume(int server) Resumes a paused server. Equivalent to kill -SIGCONT- Parameters:
server- the index of the server
-
stop
void stop(int server) Gracefully stops a running server- Parameters:
server- the index of the server
-
kill
void kill(int server) Forcefully stops a server. Equivalent to kill -SIGKILL- Parameters:
server- the index of the server
-
restart
void restart(int server) Restarts a previously stopped server.- Parameters:
server- the index of the server
-
restartCluster
void restartCluster()Restarts all of the nodes -
getJmxConnection
Returns aMBeanServerConnectionto the specified server- Parameters:
server- the index of the server
-
createRemoteCacheManager
org.infinispan.client.hotrod.RemoteCacheManager createRemoteCacheManager(org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder) -
getTimeout
int getTimeout()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
Synchronizes files from the server to the local filesystem- Parameters:
server- the serverdir- if relative, the path relative to the server root, otherwise an absolute path- Returns:
- the path where the data has been synced to
-
syncFilesToServer
-