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

Examples of com.basho.riak.client.core.query.crdt.ops.RegisterOp


    }

    @Override
    public RegisterOp getOp()
    {
        return new RegisterOp(value);
    }
View Full Code Here


    public void testGetRegisterOp()
    {

        final BinaryValue registerValue = BinaryValue.create("value");

        RegisterOp op = new RegisterOp(registerValue);

        DtUpdateOperation.Builder operation = new DtUpdateOperation.Builder(namespace);
        ByteString registerOp = operation.getRegisterOp(op);

        ByteString serializedValue = ByteString.copyFrom(registerValue.unsafeGetValue());
View Full Code Here

        MapOp op = new MapOp()
            .update(counterKey, new CounterOp(1))
            .update(setKey, new SetOp().add(setAddValue))
            .update(flagKey, new FlagOp(true))
            .update(registerKey, new RegisterOp(registerValue))
            .update(mapKey, new MapOp());

        DtUpdateOperation.Builder operation = new DtUpdateOperation.Builder(namespace);
        RiakDtPB.MapOp mapOp = operation.getMapOp(op);
View Full Code Here


        mapKey = BinaryValue.create("register");
       
        update = new DtUpdateOperation.Builder(location)
            .withOp(new MapOp().update(mapKey, new RegisterOp(mapKey)))
            .build();

        cluster.execute(update);
        update.get();
View Full Code Here

       
        ByteBuffer nowBinary = ByteBuffer.allocate(8).putLong(System.currentTimeMillis());
        byte[] now = nowBinary.array();
       
        CounterOp counterOp = new CounterOp(1);
        RegisterOp registerOp = new RegisterOp(BinaryValue.create(now));
        FlagOp flagOp = new FlagOp(false);
        SetOp setOp = new SetOp()
                        .add(BinaryValue.create("Item 1"))
                        .add(BinaryValue.create("Item 2"));
       
View Full Code Here

     * @return the update used by the client core.
     */
    @Override
    public RegisterOp getOp()
    {
        return new RegisterOp(value);
    }
View Full Code Here

TOP

Related Classes of com.basho.riak.client.core.query.crdt.ops.RegisterOp

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.