Package com.basho.riak.client.core.util

Examples of com.basho.riak.client.core.util.BinaryValue


        return update(key, builder);
    }

    public MapUpdate add(String key, FlagUpdate builder)
    {
        BinaryValue k = BinaryValue.create(key);
        return update(key, builder);
    }
View Full Code Here


        return update(key, builder);
    }

    public MapUpdate update(String key, MapUpdate builder)
    {
        BinaryValue k = BinaryValue.create(key);
        updates.add(new MapOp.MapUpdate(new MapOp.MapField(MapOp.FieldType.MAP, k), builder.getOp()));
        return this;
    }
View Full Code Here

        return this;
    }

    public MapUpdate update(String key, SetUpdate builder)
    {
        BinaryValue k = BinaryValue.create(key);
        updates.add(new MapOp.MapUpdate(new MapOp.MapField(MapOp.FieldType.SET, k), builder.getOp()));
        return this;
    }
View Full Code Here

        return this;
    }

    public MapUpdate update(String key, CounterUpdate builder)
    {
        BinaryValue k = BinaryValue.create(key);
        updates.add(new MapOp.MapUpdate(new MapOp.MapField(MapOp.FieldType.COUNTER, k), builder.getOp()));
        return this;
    }
View Full Code Here

        return this;
    }

    public MapUpdate update(String key, RegisterUpdate builder)
    {
        BinaryValue k = BinaryValue.create(key);
        updates.add(new MapOp.MapUpdate(new MapOp.MapField(MapOp.FieldType.REGISTER, k), builder.getOp()));
        return this;
    }
View Full Code Here

        return this;
    }

    public MapUpdate update(String key, FlagUpdate builder)
    {
        BinaryValue k = BinaryValue.create(key);
        updates.add(new MapOp.MapUpdate(new MapOp.MapField(MapOp.FieldType.FLAG, k), builder.getOp()));
        return this;
    }
View Full Code Here

            {
                @Override
                protected Response convertResponse(StoreOperation.Response coreResponse)
                {
                    Namespace ns = orm.getNamespace();
                    BinaryValue key = orm.getKey();
                    if (coreResponse.hasGeneratedKey())
                    {
                        key = coreResponse.getGeneratedKey();
                    }
                   
View Full Code Here

   
    @Test
    public void wrapping()
    {
        RawIndex index = indexes.getIndex(new RawIndex.Name("foo", IndexType.BIN));
        BinaryValue baw = BinaryValue.unsafeCreate("value".getBytes());
        index.add(baw);
       
        StringBinIndex wrapper = indexes.getIndex(new StringBinIndex.Name("foo"));
        assertNotSame(index, wrapper);
        assertEquals(index, wrapper);
View Full Code Here

    public void addValue()
    {
        RawIndex.Name builder = new RawIndex.Name("index_name", IndexType.BIN);
        RawIndex index = builder.createIndex();
        byte[] array = "value".getBytes();
        BinaryValue baw = BinaryValue.unsafeCreate(array);
       
        assertEquals(index.size(), 0);
        index.add(baw);
        assertEquals(index.size(), 1);
        assertTrue(index.hasValue(baw));
View Full Code Here

    @Test
    public void removeValue()
    {
        RawIndex.Name builder = new RawIndex.Name("index_name", IndexType.BIN);
        RawIndex index = builder.createIndex();
        BinaryValue baw = null;
        for (int i = 0; i < 3; i++)
        {
            baw = BinaryValue.unsafeCreate(("value" + i).getBytes());
            index.add(baw);
        }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.util.BinaryValue

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.