Package com.basho.riak.client.core.query

Examples of com.basho.riak.client.core.query.Namespace


    }
   
    @Test
    public void testSetDefaultBucketProps() throws InterruptedException, ExecutionException
    {
        Namespace namespace = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation.Builder builder =
            new StoreBucketPropsOperation.Builder(namespace)
                .withAllowMulti(true)
                .withNVal(4);
       
View Full Code Here


    }
   
    @Test
    public void testResetBucketProps() throws InterruptedException, ExecutionException
    {
        Namespace namespace = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        StoreBucketPropsOperation.Builder builder =
            new StoreBucketPropsOperation.Builder(namespace)
                .withNVal(4)
                .withR(1);
       
View Full Code Here

   
    @Test
    public void testFetchBucketPropsFromType() throws InterruptedException, ExecutionException
    {
        Assume.assumeTrue(testBucketType);
        Namespace namespace = new Namespace(bucketType, bucketName);
        BucketProperties props = fetchBucketProps(namespace);
        assertTrue(props.hasNVal());
        assertTrue(props.hasAllowMulti());
        assertTrue(props.hasBasicQuorum());
        assertTrue(props.hasBigVClock());
View Full Code Here

   
    @Test
    public void testSetBucketPropsInType() throws InterruptedException, ExecutionException
    {
        Assume.assumeTrue(testBucketType);
        Namespace namespace = new Namespace(bucketType, bucketName);
        StoreBucketPropsOperation.Builder builder =
            new StoreBucketPropsOperation.Builder(namespace)
                .withR(1)
                .withNVal(4);
       
        storeBucketProps(builder);
        BucketProperties props = fetchBucketProps(namespace);
       
        assertEquals(props.getNVal(), Integer.valueOf(4));
        assertEquals(props.getR().getIntValue(), 1);
       
        namespace = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
        props = fetchBucketProps(namespace);
        assertEquals(props.getNVal(), Integer.valueOf(3));
    }
View Full Code Here

   
    @Test
    public void producesRiakObject()
    {
        String foo = "some value";
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
        StringConverter converter = new StringConverter();
       
       
        Converter.OrmExtracted orm = converter.fromDomain(foo, ns, BinaryValue.create("key"));
       
View Full Code Here

                        .withRemotePort(startingPort + NetworkTestFixture.PB_FULL_WRITE_ERROR_STAY_OPEN)
                        .build();
       
        node.start();
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "test_bucket");
        Location location = new Location(ns, "test_key2");
       
        for (int i = 0; i < 6; i++)
        {
            FetchOperation operation =
View Full Code Here

                        .withRemotePort(startingPort + NetworkTestFixture.PB_FULL_WRITE_STAY_OPEN)
                        .build();
       
        node.start();
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "test_bucket");
        Location location = new Location(ns, "test_key2");
       
        FetchOperation operation =
            new FetchOperation.Builder(location)
                    .build();
View Full Code Here

                        .withRemoteAddress("127.0.0.1")
                        .withRemotePort(startingPort + NetworkTestFixture.ACCEPT_THEN_CLOSE)
                        .build();
        node.start();
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "test_bucket");
        Location location = new Location(ns, "test_key2");

        FetchOperation operation =
            new FetchOperation.Builder(location)
                    .build();
View Full Code Here

    public void testStoreOperationCreateChannelMessage() throws InvalidProtocolBufferException
    {

        byte[] expectedValue = new byte[]{'O', '_', 'o'};

        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
        BinaryValue key = BinaryValue.create("key".getBytes());

        RiakObject ro = new RiakObject();

        List<RiakLink> links = new ArrayList<RiakLink>();
View Full Code Here

{

    private RiakCounter fetchCounter(BinaryValue type, BinaryValue bucket, BinaryValue key)
        throws ExecutionException, InterruptedException
    {
        Location location = new Location(new Namespace(type, bucket), key);
        DtFetchOperation fetch = new DtFetchOperation.Builder(location).build();
        cluster.execute(fetch);
        DtFetchOperation.Response response = fetch.get();
        RiakDatatype element = response.getCrdtElement();
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.query.Namespace

Copyright © 2018 www.massapicom. 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.