org.infinispan.hotrod.impl.operations.ClearOperation Maven / Gradle / Ivy
The newest version!
package org.infinispan.hotrod.impl.operations;
import org.infinispan.api.common.CacheOptions;
import org.infinispan.hotrod.impl.transport.netty.HeaderDecoder;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
/**
* Corresponds to clear operation as defined by Hot Rod
* protocol specification.
*
* @since 14.0
*/
public class ClearOperation extends RetryOnFailureOperation {
public ClearOperation(OperationContext operationContext, CacheOptions options) {
super(operationContext, CLEAR_REQUEST, CLEAR_RESPONSE, options, null);
}
@Override
protected void executeOperation(Channel channel) {
sendHeaderAndRead(channel);
}
@Override
public void acceptResponse(ByteBuf buf, short status, HeaderDecoder decoder) {
complete(null);
}
}