net.rubyeye.xmemcached.command.binary.BinaryGetAndTouchCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xmemcached Show documentation
Show all versions of xmemcached Show documentation
Extreme performance modern memcached client for java
package net.rubyeye.xmemcached.command.binary;
import java.util.concurrent.CountDownLatch;
import net.rubyeye.xmemcached.command.CommandType;
import net.rubyeye.xmemcached.transcoders.CachedData;
/**
* Binary GAT/GATQ command
*
* @author dennis
*
*/
public class BinaryGetAndTouchCommand extends BinaryGetCommand {
public BinaryGetAndTouchCommand(String key, byte[] keyBytes,
CommandType cmdType, CountDownLatch latch, int exp, boolean noreply) {
super(key, keyBytes, cmdType, latch, null, noreply);
this.expTime = exp;
switch (cmdType) {
case GAT:
this.opCode = OpCode.GAT;
break;
case GATQ:
this.opCode = OpCode.GATQ;
break;
default:
throw new IllegalArgumentException("Invalid GAT command type:"
+ cmdType);
}
}
@Override
protected void fillExtras(CachedData data) {
this.ioBuffer.putInt(this.expTime);
}
@Override
protected byte getExtrasLength() {
return 4;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy