All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy