Example usage for io.netty.handler.codec.memcache.binary BinaryMemcacheRequest setCas

List of usage examples for io.netty.handler.codec.memcache.binary BinaryMemcacheRequest setCas

Introduction

In this page you can find the example usage for io.netty.handler.codec.memcache.binary BinaryMemcacheRequest setCas.

Prototype

BinaryMemcacheMessage setCas(long cas);

Source Link

Document

Sets the CAS identifier.

Usage

From source file:com.couchbase.client.core.endpoint.binary.BinaryCodec.java

License:Open Source License

private BinaryMemcacheRequest handleRemoveRequest(final RemoveRequest request) {
    BinaryMemcacheRequest msg = new DefaultBinaryMemcacheRequest(request.key());

    msg.setOpcode(BinaryMemcacheOpcodes.DELETE);
    msg.setCAS(request.cas());
    msg.setKeyLength((short) request.key().length());
    msg.setTotalBodyLength((short) request.key().length());
    msg.setReserved(request.partition());
    return msg;/* w w  w. j  av a 2 s  .  co m*/
}