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

org.infinispan.hotrod.impl.operations.PutOperation Maven / Gradle / Ivy

The newest version!
package org.infinispan.hotrod.impl.operations;

import org.infinispan.api.common.CacheEntry;
import org.infinispan.api.common.CacheWriteOptions;
import org.infinispan.hotrod.impl.DataFormat;

import io.netty.buffer.ByteBuf;

/**
 * Implements "put" as defined by  Hot Rod protocol
 * specification.
 *
 * @since 14.0
 */
public class PutOperation extends AbstractPutOperation> {

   public PutOperation(OperationContext operationContext, K key, byte[] keyBytes, byte[] value, CacheWriteOptions options, DataFormat dataFormat) {
      super(operationContext, key, keyBytes, value, options, dataFormat);
   }

   @Override
   protected int flags() {
      return super.flags() | PrivateHotRodFlag.FORCE_RETURN_VALUE.getFlagInt();
   }

   @Override
   void completeResponse(ByteBuf buf, short status) {
      complete(returnPossiblePrevValue(buf, status));
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy