Class ClusterService


  • public class ClusterService
    extends Object
    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
    • Constructor Detail

      • ClusterService

        public ClusterService()
    • Method Detail

      • getSession

        public com.datastax.driver.core.Session getSession()
      • initCluster

        protected com.datastax.driver.core.Cluster initCluster()
                                                        throws ArchiveException
        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

        public boolean isValidKeyspaceName​(String keySpace)
        Test if the keyspace name is valid.
        Parameters:
        keySpace -
        Returns:
      • createKeySpace

        protected com.datastax.driver.core.Session createKeySpace​(String keySpace)
                                                           throws ArchiveException
        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