See: Description
| Interface | Description |
|---|---|
| Cassandra | |
| CassandraBuilderConfigurator |
A callback interface to configure a
CassandraBuilder. |
| CassandraDirectoryProvider |
Provides a path to Cassandra directory based on a version.
|
| Settings |
Cassandra settings.
|
| WorkingDirectoryCustomizer |
A callback interface to customize a working directory.
|
| WorkingDirectoryDestroyer |
A strategy interface to destroy the working directory.
|
| WorkingDirectoryInitializer |
A strategy interface to initialize the working directory.
|
| Class | Description |
|---|---|
| CassandraBuilder |
A builder that can be used to configure and create
Cassandra. |
| DefaultWorkingDirectoryInitializer |
The default implementation of
WorkingDirectoryInitializer, that gets Cassandra directory from the CassandraDirectoryProvider and copies all files from a retrieved directory into the working directory except
javadoc, doc and licenses directories. |
| SimpleSeedProviderConfigurator |
A
CassandraBuilderConfigurator that configures org.apache.cassandra.locator.SimpleSeedProvider. |
| Version |
A representation of a Cassandra version.
|
| WebCassandraDirectoryProvider |
The implementation of
CassandraDirectoryProvider, that downloads and extracts Cassandra archive from the
well-known URLs into the download directory. |
| Enum | Description |
|---|---|
| DefaultWorkingDirectoryInitializer.CopyStrategy |
Casandra files copy strategies.
|
| Exception | Description |
|---|---|
| CassandraException |
Exceptions thrown by a
Cassandra. |
Public API contains the following classes and interfaces:
Cassandra Interface that represents Cassandra instance.
Cassandra instance.
Interface that loads CQL statements from various
sources.
A strategy interface to initialize working directory.
A strategy interface to destroy the working directory.
A customizer interface that can be used to customize the working directory.
A callback interface to configure a CassandraBuilder.
Example:
Cassandra cassandra = new CassandraBuilder().build();
cassandra.start();
try {
Settings settings = cassandra.getSettings();
try (Cluster cluster = Cluster.builder().addContactPoints(settings.getAddress())
.withPort(settings.getPort()).build()) {
Session session = cluster.connect();
CqlScript.ofClassPath("schema.cql").forEachStatement(session::execute);
}
}
finally {
cassandra.stop();
}
Copyright © 2023. All rights reserved.