Package org.infinispan.server.test.core
Class ForkedInfinispanServerDriver
java.lang.Object
org.infinispan.server.test.core.AbstractInfinispanServerDriver
org.infinispan.server.test.core.ForkedInfinispanServerDriver
- All Implemented Interfaces:
InfinispanServerDriver
- Since:
- 11.0
- Author:
- Gustavo Lira <glira@redhat.com>, Radoslav Husar
-
Field Summary
Fields inherited from class org.infinispan.server.test.core.AbstractInfinispanServerDriver
BASE_DN, configuration, DEFAULT_CLUSTERED_INFINISPAN_CONFIG_FILE_NAME, DEFAULT_SERVER_CONFIG, DEFAULT_SERVER_DATA, DEFAULT_SERVER_LIB, DEFAULT_SERVER_LOG, INFINISPAN_CLUSTER_NAME, INFINISPAN_CLUSTER_STACK, INFINISPAN_SERVER_CONFIG_PATH, INFINISPAN_SERVER_ROOT_PATH, JOIN_TIMEOUT, KEY_ALGORITHM, KEY_PASSWORD, KEY_SIGNATURE_ALGORITHM, TEST_HOST_ADDRESS, testHostAddress -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForkedInfinispanServerDriver(InfinispanServerTestConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptiongetJmxConnection(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.intReturns 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 the server.voidPrepare a server layoutvoidrestart(int server) Restarts a previously stopped server.voidRestarts all of the nodesvoidresume(int server) Resumes a paused server.protected voidprotected voidstop()Stop whole cluster.voidstop(int server) Stop a specific serversyncFilesFromServer(int server, String dir) Synchronizes files from the server to the local filesystemsyncFilesToServer(int server, String path) Methods inherited from class org.infinispan.server.test.core.AbstractInfinispanServerDriver
applyKeyStore, applyKeyStore, applyKeyStore, applyKeyStore, applyTrustStore, applyTrustStore, applyTrustStore, applyTrustStore, copyArtifactsToUserLibDir, createKeyStores, createRemoteCacheManager, createSelfSignedCertificate, createServerHierarchy, createServerHierarchy, createSignedCertificate, createUserFile, debugJvmOption, dn, getCertificateFile, getConfDir, getConfiguration, getName, getRootDir, getStatus, serverRoot, start, stop
-
Constructor Details
-
ForkedInfinispanServerDriver
-
-
Method Details
-
prepare
Description copied from class:AbstractInfinispanServerDriverPrepare a server layout- Specified by:
preparein interfaceInfinispanServerDriver- Overrides:
preparein classAbstractInfinispanServerDriver- Parameters:
name- the name of the server configuration
-
start
- Specified by:
startin classAbstractInfinispanServerDriver
-
stop
protected void stop()Stop whole cluster.- Specified by:
stopin classAbstractInfinispanServerDriver
-
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:InfinispanServerDriverDetermines 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
Description copied from interface:InfinispanServerDriverReturns 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
Description copied from interface:InfinispanServerDriverReturns 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:AbstractInfinispanServerDriverPauses the server. Equivalent to kill -SIGSTOP- Specified by:
pausein interfaceInfinispanServerDriver- Overrides:
pausein classAbstractInfinispanServerDriver- Parameters:
server- the index of the server
-
resume
public void resume(int server) Description copied from interface:InfinispanServerDriverResumes a paused server. Equivalent to kill -SIGCONT- Parameters:
server- the index of the server
-
kill
public void kill(int server) Description copied from interface:InfinispanServerDriverForcefully stops a server. Equivalent to kill -SIGKILL- Parameters:
server- the index of the server
-
restart
public void restart(int server) Description copied from interface:InfinispanServerDriverRestarts a previously stopped server.- Parameters:
server- the index of the server
-
restartCluster
public void restartCluster()Description copied from interface:InfinispanServerDriverRestarts all of the nodes -
getJmxConnection
Description copied from interface:InfinispanServerDriverReturns aMBeanServerConnectionto the specified server- Parameters:
server- the index of the server
-
getTimeout
public int getTimeout()Description copied from interface:InfinispanServerDriverReturns 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
Description copied from interface:InfinispanServerDriverSynchronizes 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
-