private List < Future > doBatchLoad ( List < Data > keys ) { Queue < List < Data >> batchChunks = createBatchChunks ( keys ) ; int size = batchChunks . size ( ) ; List < Future > futures = new ArrayList <> ( size ) ; while ( ! batchChunks . isEmpty ( ) ) { List < Data > chunk = batchChunks . poll ( ) ; List < Data > keyValueSequence = loadAndGet ( chunk ) ; if ( keyValueSequence . isEmpty ( ) ) { continue ; } futures . add ( sendOperation ( keyValueSequence ) ) ; } return futures ; }
Loads the values for the provided keys in batches and invokes partition operations to put the loaded entry batches into the record store .