List of usage examples for io.netty.handler.codec.memcache.binary BinaryMemcacheRequest setReserved
BinaryMemcacheRequest setReserved(short reserved);
From source file:com.couchbase.client.core.endpoint.binary.BinaryCodec.java
License:Open Source License
/** * Creates the actual protocol level request for an incoming get request. * * @param request the incoming get request. * @return the built protocol request.//from w w w .j a va 2 s . c om */ private BinaryMemcacheRequest handleGetRequest(final GetRequest request) { int length = request.key().length(); BinaryMemcacheRequest msg = new DefaultBinaryMemcacheRequest(request.key()); msg.setOpcode(BinaryMemcacheOpcodes.GET); msg.setKeyLength((short) length); msg.setTotalBodyLength((short) length); msg.setReserved(request.partition()); return msg; }
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());//from w w w. j av a 2 s . co m msg.setKeyLength((short) request.key().length()); msg.setTotalBodyLength((short) request.key().length()); msg.setReserved(request.partition()); return msg; }