Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.client.hotrod.impl.operations;
 
 
 
Corresponds to getWithMetadata operation as described by Hot Rod protocol specification.

Author(s):
Tristan Tarrant
Since:
5.2
   private static final Log log = LogFactory.getLog(GetWithMetadataOperation.class);
   public GetWithMetadataOperation(Codec codecTransportFactory transportFactory,
            byte[] keybyte[] cacheNameAtomicInteger topologyIdFlag[] flags) {
      super(codectransportFactorykeycacheNametopologyIdflags);
   }
   @Override
   protected MetadataValue<byte[]> executeOperation(Transport transport) {
      short status = sendKeyOperation(transport);
      MetadataValue<byte[]> result = null;
      if (status == ) {
         result = null;
      } else if (status == ) {
         short flags = transport.readByte();
         long creation = -1;
         int lifespan = -1;
         long lastUsed = -1;
         int maxIdle = -1;
         if ((flags & ) != ) {
            creation = transport.readLong();
            lifespan = transport.readVInt();
         }
         if ((flags & ) != ) {
            lastUsed = transport.readLong();
            maxIdle = transport.readVInt();
         }
         long version = transport.readLong();
         if (.isTraceEnabled()) {
            .tracef("Received version: %d"version);
         }
         byte[] value = transport.readArray();
         result = new MetadataValueImpl<byte[]>(creationlifespanlastUsedmaxIdleversionvalue);
      }
      return result;
   }
New to GrepCode? Check out our FAQ X