Class ClusterService
java.lang.Object
org.imixs.archive.service.cassandra.ClusterService
The ClusterService provides methods to persist the content of a Imixs
Document into a Cassandra keystore.
The service saves the content in XML format. The size of an XML representation of a Imixs document is only slightly different in size from the serialized map object. This is the reason why we do not store the document map in a serialized object format.
The ClusterService creates a Core-KeySpace automatically which is used for the internal management.
- Author:
- rsoika
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateArchiveTableSchema(com.datastax.driver.core.Session session) This helper method creates the ImixsArchive document table schema if not yet existsprotected com.datastax.driver.core.SessioncreateKeySpace(String keySpace) This method creates a cassandra keySpace.com.datastax.driver.core.Sessionprotected com.datastax.driver.core.ClusterThis method creates a Cassandra Cluster object.booleanisValidKeyspaceName(String keySpace) Test if the keyspace name is valid.
-
Field Details
-
KEYSPACE_REGEX
- See Also:
-
ENV_ARCHIVE_CLUSTER_CONTACTPOINTS
- See Also:
-
ENV_ARCHIVE_CLUSTER_KEYSPACE
- See Also:
-
ENV_ARCHIVE_CLUSTER_AUTH_USER
- See Also:
-
ENV_ARCHIVE_CLUSTER_AUTH_PASSWORD
- See Also:
-
ENV_ARCHIVE_CLUSTER_SSL
- See Also:
-
ENV_ARCHIVE_CLUSTER_SSL_TRUSTSTOREPATH
- See Also:
-
ENV_ARCHIVE_CLUSTER_SSL_TRUSTSTOREPASSWORD
- See Also:
-
ENV_ARCHIVE_CLUSTER_SSL_KEYSTOREPATH
- See Also:
-
ENV_ARCHIVE_CLUSTER_SSL_KEYSTOREPASSWORD
- See Also:
-
ENV_ARCHIVE_CLUSTER_REPLICATION_FACTOR
- See Also:
-
ENV_ARCHIVE_CLUSTER_REPLICATION_CLASS
- See Also:
-
TABLE_SCHEMA_SNAPSHOTS
- See Also:
-
TABLE_SCHEMA_SNAPSHOTS_BY_UNIQUEID
- See Also:
-
TABLE_SCHEMA_SNAPSHOTS_BY_MODIFIED
- See Also:
-
TABLE_SCHEMA_DOCUMENTS
- See Also:
-
TABLE_SCHEMA_SNAPSHOTS_BY_DOCUMENT
- See Also:
-
TABLE_SCHEMA_DOCUMENTS_DATA
- See Also:
-
-
Constructor Details
-
ClusterService
public ClusterService()
-
-
Method Details
-
getSession
public com.datastax.driver.core.Session getSession() -
initCluster
This method creates a Cassandra Cluster object. The cluster is defined by ContactPoints provided in the environmetn variable 'ARCHIVE_CLUSTER_CONTACTPOINTS' or in the imixs.property 'archive.cluster.contactpoints'- Returns:
- Cassandra Cluster instacne
- Throws:
ArchiveException
-
isValidKeyspaceName
Test if the keyspace name is valid.- Parameters:
keySpace-- Returns:
-
createKeySpace
This method creates a cassandra keySpace.Depending on the KeyspaceType, the method creates the core table schema to store configurations, or the extended Archive table schcema which is used to store imixs documents.
- Parameters:
cluster-- Throws:
ArchiveException
-
createArchiveTableSchema
protected void createArchiveTableSchema(com.datastax.driver.core.Session session) This helper method creates the ImixsArchive document table schema if not yet exists
-