private synchronized void init()

in src/main/java/org/apache/sling/cassandra/resource/provider/CassandraResourceProvider.java [86:101]


    private synchronized void init() {
        System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ PROVIDER INIT");
        cluster = HFactory.getOrCreateCluster(CassandraConstants.CASSANDRA_DEFAULT_CLUSTER_NAME, CASSANDRA_EP);
        KeyspaceDefinition keyspaceDef = cluster.describeKeyspace(KEYSPACE);
        if (keyspaceDef == null) {
            try {
                createSchema(cluster);
            } catch (Exception ignore) {
                System.out.println("Ignoring the exception when trying to create a already existing schema " + ignore.getMessage());
                LOGGER.debug("Ignoring the exception when trying to create a already existing schema " + ignore.getMessage());
            }
        }
        this.keyspace = HFactory.createKeyspace(KEYSPACE, cluster);
        System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ PROVIDER INIT2");

    }