Package org.easycassandra.persistence.cassandra.FixKeySpaceUtil

Examples of org.easycassandra.persistence.cassandra.FixKeySpaceUtil.CreateKeySpace.createQuery()


    public void createKeySpace(KeySpaceQueryInformation information, Session session) {

        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(information.getReplicaStrategy());
        try {
            session.execute(createKeySpace.createQuery(information));
        } catch (InvalidQueryException exception) {
            error(information, createKeySpace, exception);
        }
    }
View Full Code Here


        query.setReplicaStrategy(ReplicaStrategy.NETWORK_TOPOLOGY_STRATEGY);
        query.setKeySpace("javabahia");
        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(query.getReplicaStrategy());
        Assert.assertEquals(
                createKeySpace.createQuery(query),
                NETWORK_TEST);

    }

    /**
 
View Full Code Here

        query.getDataCenter().put("DC1", 1);
        query.getDataCenter().put("DC2", THREE);
        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(query.getReplicaStrategy());
        Assert.assertEquals(
                createKeySpace.createQuery(query),
                NETWORK_DC_TEST);

    }
    /**
     * test.
 
View Full Code Here

        query.setKeySpace("javabahia");
        query.setFactor(THREE);
        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(query.getReplicaStrategy());
        Assert.assertEquals(
                createKeySpace.createQuery(query),
                SIMPLE_TEST);

    }
    /**
     * test.
 
View Full Code Here

        KeySpaceQueryInformation query = new KeySpaceQueryInformation();
        query.setReplicaStrategy(ReplicaStrategy.CUSTOM_STRATEGY);
        query.setKeySpace("javabahia");
        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(query.getReplicaStrategy());
        createKeySpace.createQuery(query);

    }
    /**
     * test.
     */
 
View Full Code Here

        query.setReplicaStrategy(ReplicaStrategy.CUSTOM_STRATEGY);
        query.setKeySpace("javabahia");
        query.setCustomQuery(CUSTOM_QUERY_ERRO_TEST);
        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(query.getReplicaStrategy());
        createKeySpace.createQuery(query);

    }

    /**
     * test.
 
View Full Code Here

        query.setKeySpace("javabahia");
        query.setCustomQuery(CUSTOM_QUERY);
        CreateKeySpace createKeySpace = FixKeySpaceUtil.INSTANCE
                .getCreate(query.getReplicaStrategy());

        Assert.assertEquals(createKeySpace.createQuery(query), query.getCustomQuery());

    }
}
View Full Code Here

TOP
Copyright © 2015 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.