CassandraContainer instead.@Deprecated
public class CassandraContainer<SELF extends CassandraContainer<SELF>>
extends org.testcontainers.containers.GenericContainer<SELF>
Supported image: cassandra
Exposed ports: 9042
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Integer |
CQL_PORT
Deprecated.
|
static java.lang.String |
IMAGE
Deprecated.
|
| Constructor and Description |
|---|
CassandraContainer()
Deprecated.
use
CassandraContainer(DockerImageName) instead |
CassandraContainer(org.testcontainers.utility.DockerImageName dockerImageName)
Deprecated.
|
CassandraContainer(java.lang.String dockerImageName)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure()
Deprecated.
|
protected void |
containerIsStarted(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
Deprecated.
|
com.datastax.driver.core.Cluster |
getCluster()
Deprecated.
For Cassandra driver 3.x, use
ContainerState.getHost() and ContainerState.getMappedPort(int) with
the driver's Cluster.Builder addContactPoint(String) and
withPort(int) methods to create a Cluster object. For Cassandra driver 4.x, use
getContactPoint() and getLocalDatacenter() with the driver's CqlSession.builder()
addContactPoint(InetSocketAddress) and withLocalDatacenter(String) methods to create
a Session Object. See https://docs.datastax.com/en/developer/java-driver/ for more on the driver. |
static com.datastax.driver.core.Cluster |
getCluster(org.testcontainers.containers.ContainerState containerState)
Deprecated.
|
static com.datastax.driver.core.Cluster |
getCluster(org.testcontainers.containers.ContainerState containerState,
boolean enableJmxReporting)
Deprecated.
|
java.net.InetSocketAddress |
getContactPoint()
Deprecated.
Retrieve an
InetSocketAddress for connecting to the Cassandra container via the driver. |
java.lang.String |
getLocalDatacenter()
Deprecated.
Retrieve the Local Datacenter for connecting to the Cassandra container via the driver.
|
java.lang.String |
getPassword()
Deprecated.
Get password
By default Cassandra has authenticator: AllowAllAuthenticator in cassandra.yaml
If username and password need to be used, then authenticator should be set as PasswordAuthenticator
(through custom Cassandra configuration) and through CQL with default cassandra-cassandra credentials
user management should be modified
|
java.lang.String |
getUsername()
Deprecated.
Get username
By default Cassandra has authenticator: AllowAllAuthenticator in cassandra.yaml
If username and password need to be used, then authenticator should be set as PasswordAuthenticator
(through custom Cassandra configuration) and through CQL with default cassandra-cassandra credentials
user management should be modified
|
protected void |
optionallyMapResourceParameterAsVolume(java.lang.String pathNameInContainer,
java.lang.String resourceLocation)
Deprecated.
Map (effectively replace) directory in Docker with the content of resourceLocation if resource location is not null
Protected to allow for changing implementation by extending the class
|
SELF |
withConfigurationOverride(java.lang.String configLocation)
Deprecated.
Initialize Cassandra with the custom overridden Cassandra configuration
|
SELF |
withInitScript(java.lang.String initScriptPath)
Deprecated.
Initialize Cassandra with init CQL script
|
SELF |
withJmxReporting(boolean enableJmxReporting)
Deprecated.
Initialize Cassandra client with JMX reporting enabled or disabled
|
addEnv, addExposedPort, addExposedPorts, addFileSystemBind, addFixedExposedPort, addFixedExposedPort, addLink, apply, canBeReused, containerIsCreated, containerIsStarted, containerIsStarting, containerIsStarting, containerIsStopped, containerIsStopping, copyFileFromContainer, createVolumeDirectory, dependsOn, dependsOn, dependsOn, doStart, equals, 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, hashCode, isHostAccessible, isPrivilegedMode, isShouldBeReused, logger, setBinds, setCommand, setCommand, setCommandParts, setContainerDef, 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, toString, 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, withWorkingDirectoryclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddFileSystemBind, followOutput, followOutput, self, withEnv, withFileSystemBindcopyFileFromContainer, copyFileToContainer, copyFileToContainer, execInContainer, execInContainer, execInContainer, execInContainer, execInContainerWithUser, execInContainerWithUser, getBoundPortNumbers, getContainerIpAddress, getCurrentContainerInfo, getFirstMappedPort, getHost, getLogs, getLogs, getMappedPort, isCreated, isHealthy, isRunning@Deprecated public static final java.lang.String IMAGE
public static final java.lang.Integer CQL_PORT
@Deprecated public CassandraContainer()
CassandraContainer(DockerImageName) insteadpublic CassandraContainer(java.lang.String dockerImageName)
public CassandraContainer(org.testcontainers.utility.DockerImageName dockerImageName)
protected void configure()
configure in class org.testcontainers.containers.GenericContainer<SELF extends CassandraContainer<SELF>>protected void containerIsStarted(com.github.dockerjava.api.command.InspectContainerResponse containerInfo)
containerIsStarted in class org.testcontainers.containers.GenericContainer<SELF extends CassandraContainer<SELF>>protected void optionallyMapResourceParameterAsVolume(java.lang.String pathNameInContainer,
java.lang.String resourceLocation)
pathNameInContainer - path in dockerresourceLocation - relative classpath to resourcepublic SELF withConfigurationOverride(java.lang.String configLocation)
Be aware, that Docker effectively replaces all /etc/cassandra content with the content of config location, so if Cassandra.yaml in configLocation is absent or corrupted, then Cassandra just won't launch
configLocation - relative classpath with the directory that contains cassandra.yaml and other configuration filespublic SELF withInitScript(java.lang.String initScriptPath)
CQL script will be applied after container is started (see using WaitStrategy)
initScriptPath - relative classpath resourcepublic SELF withJmxReporting(boolean enableJmxReporting)
public java.lang.String getUsername()
public java.lang.String getPassword()
@Deprecated public com.datastax.driver.core.Cluster getCluster()
ContainerState.getHost() and ContainerState.getMappedPort(int) with
the driver's Cluster.Builder addContactPoint(String) and
withPort(int) methods to create a Cluster object. For Cassandra driver 4.x, use
getContactPoint() and getLocalDatacenter() with the driver's CqlSession.builder()
addContactPoint(InetSocketAddress) and withLocalDatacenter(String) methods to create
a Session Object. See https://docs.datastax.com/en/developer/java-driver/ for more on the driver.@Deprecated
public static com.datastax.driver.core.Cluster getCluster(org.testcontainers.containers.ContainerState containerState,
boolean enableJmxReporting)
@Deprecated public static com.datastax.driver.core.Cluster getCluster(org.testcontainers.containers.ContainerState containerState)
public java.net.InetSocketAddress getContactPoint()
InetSocketAddress for connecting to the Cassandra container via the driver.public java.lang.String getLocalDatacenter()