Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.client.hotrod.impl.operations;
 
 
Reads more keys at a time. Specified here.

Author(s):
Mircea.Markus@jboss.com
Since:
4.1
public class BulkGetOperation extends RetryOnFailureOperation<Map<byte[], byte[]>> {
   private final int entryCount;
   public BulkGetOperation(Codec codecTransportFactory transportFactorybyte[] cacheNameAtomicInteger topologyIdFlag[] flagsint entryCount) {
      super(codectransportFactorycacheNametopologyIdflags);
      this. = entryCount;
   }
   
   @Override
   protected Transport getTransport(int retryCountSet<SocketAddressfailedServers) {
      return .getTransport(failedServers);
   }
   @Override
   protected Map<byte[], byte[]> executeOperation(Transport transport) {
      HeaderParams params = writeHeader(transport);
      transport.writeVInt();
      transport.flush();
      readHeaderAndValidate(transportparams);
      Map<byte[], byte[]> result = new HashMap<byte[], byte[]>();
      while ( transport.readByte() == 1) { //there's more!
         result.put(transport.readArray(), transport.readArray());
      }
      return result;
   }
New to GrepCode? Check out our FAQ X