Package com.redis.testcontainers
Class RedisClusterContainer
- java.lang.Object
-
- org.testcontainers.containers.FailureDetectingExternalResource
-
- org.testcontainers.containers.GenericContainer<RedisClusterContainer>
-
- com.redis.testcontainers.RedisClusterContainer
-
- All Implemented Interfaces:
RedisServer,java.lang.AutoCloseable,org.junit.rules.TestRule,org.testcontainers.containers.Container<RedisClusterContainer>,org.testcontainers.containers.ContainerState,org.testcontainers.containers.traits.LinkableContainer,org.testcontainers.containers.wait.strategy.WaitStrategyTarget,org.testcontainers.lifecycle.Startable
public class RedisClusterContainer extends org.testcontainers.containers.GenericContainer<RedisClusterContainer> implements RedisServer
-
-
Field Summary
Fields Modifier and Type Field Description static org.testcontainers.utility.DockerImageNameDEFAULT_IMAGE_NAMEstatic intDEFAULT_INITIAL_PORTstatic java.lang.StringDEFAULT_IPstatic intDEFAULT_MASTERSstatic intDEFAULT_SLAVES_PER_MASTERstatic java.lang.StringDEFAULT_TAG
-
Constructor Summary
Constructors Constructor Description RedisClusterContainer()Deprecated.RedisClusterContainer(org.testcontainers.utility.DockerImageName dockerImageName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetRedisURI()java.lang.String[]getRedisURIs()inthashCode()booleanisCluster()booleanisEnabled()java.lang.StringtoString()RedisClusterContainerwithInitialPort(int port)RedisClusterContainerwithIP(java.lang.String ip)RedisClusterContainerwithKeyspaceNotifications()RedisClusterContainerwithMasters(int count)RedisClusterContainerwithSlavesPerMaster(int count)-
Methods inherited from class org.testcontainers.containers.GenericContainer
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, configure, containerIsCreated, containerIsStarted, containerIsStarted, containerIsStarting, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, createVolumeDirectory, dependsOn, dependsOn, dependsOn, doStart, failed, finished, getBinds, getCommandParts, getContainerId, getContainerInfo, getContainerName, getCopyToFileContainerPathMap, getCreateContainerCmdModifiers, getDependencies, getDockerClient, getDockerImageName, getEnv, getEnvMap, getExposedPorts, getExtraHosts, getImage, getIpAddress, getLabels, getLinkedContainers, getLivenessCheckPort, getLivenessCheckPortNumbers, getLivenessCheckPorts, getLogConsumers, getNetwork, getNetworkAliases, getNetworkMode, getPortBindings, getShmSize, getStartupAttempts, getStartupCheckStrategy, getTestHostIpAddress, getTmpFsMapping, getVolumesFroms, getWaitStrategy, getWorkingDirectory, isHostAccessible, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, setCopyToFileContainerPathMap, setDockerImageName, setEnv, setExposedPorts, setExtraHosts, setHostAccessible, setImage, setLabels, setLinkedContainers, setLogConsumers, setNetwork, setNetworkAliases, setNetworkMode, setPortBindings, setPrivilegedMode, setShmSize, setStartupAttempts, setStartupCheckStrategy, setTmpFsMapping, setVolumesFroms, setWaitStrategy, setWorkingDirectory, start, starting, stop, succeeded, waitingFor, waitUntilContainerStarted, withAccessToHost, withClasspathResourceMapping, withClasspathResourceMapping, withCommand, withCommand, withCopyFileToContainer, withCopyToContainer, withCreateContainerCmdModifier, withEnv, withEnv, withExposedPorts, withExtraHost, withFileSystemBind, withImagePullPolicy, withLabel, withLabels, withLogConsumer, withMinimumRunningDuration, withNetwork, withNetworkAliases, withNetworkMode, withPrivilegedMode, withReuse, withSharedMemorySize, withStartupAttempts, withStartupCheckStrategy, withStartupTimeout, withTmpFs, withVolumesFrom, withWorkingDirectory
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.testcontainers.containers.Container
addFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBind
-
Methods inherited from interface org.testcontainers.containers.ContainerState
copyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunning
-
-
-
-
Field Detail
-
DEFAULT_IMAGE_NAME
public static final org.testcontainers.utility.DockerImageName DEFAULT_IMAGE_NAME
-
DEFAULT_TAG
public static final java.lang.String DEFAULT_TAG
- See Also:
- Constant Field Values
-
DEFAULT_INITIAL_PORT
public static final int DEFAULT_INITIAL_PORT
- See Also:
- Constant Field Values
-
DEFAULT_MASTERS
public static final int DEFAULT_MASTERS
- See Also:
- Constant Field Values
-
DEFAULT_SLAVES_PER_MASTER
public static final int DEFAULT_SLAVES_PER_MASTER
- See Also:
- Constant Field Values
-
DEFAULT_IP
public static final java.lang.String DEFAULT_IP
- See Also:
- Constant Field Values
-
-
Method Detail
-
isCluster
public boolean isCluster()
- Specified by:
isClusterin interfaceRedisServer
-
withKeyspaceNotifications
public RedisClusterContainer withKeyspaceNotifications()
-
withIP
public RedisClusterContainer withIP(java.lang.String ip)
-
getRedisURIs
public java.lang.String[] getRedisURIs()
-
getRedisURI
public java.lang.String getRedisURI()
- Specified by:
getRedisURIin interfaceRedisServer
-
withMasters
public RedisClusterContainer withMasters(int count)
-
withSlavesPerMaster
public RedisClusterContainer withSlavesPerMaster(int count)
-
withInitialPort
public RedisClusterContainer withInitialPort(int port)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.testcontainers.containers.GenericContainer<RedisClusterContainer>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classorg.testcontainers.containers.GenericContainer<RedisClusterContainer>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classorg.testcontainers.containers.GenericContainer<RedisClusterContainer>
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceRedisServer
-
-