Package com.netflix.astyanax

Examples of com.netflix.astyanax.ColumnMutation


            SerializerPackage sp = AstyanaxConnection.instance.keyspace().getSerializerPackage(cfName, false);
            // work around
            ByteBuffer rowKey = sp.keyAsByteBuffer(key);
            ByteBuffer column = sp.columnAsByteBuffer(colName);
            ColumnFamily<ByteBuffer, ByteBuffer> columnFamily = new ColumnFamily(cfName, ByteBufferSerializer.get(), ByteBufferSerializer.get());
            ColumnMutation mutation = AstyanaxConnection.instance.keyspace().prepareColumnMutation(columnFamily, rowKey, column);
            OperationResult<Void> result;
            if (isCounter)
                result = mutation.incrementCounterColumn(LongSerializer.get().fromByteBuffer(value)).execute();
            else
                result = mutation.putValue(value, null).execute();
            return new AstyanaxResponseData("", 0, result, key, colName, value);
        }
        catch (Exception e)
        {
            throw new OperationException(e);
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.ColumnMutation

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.