private List < Future > sendBatch ( Map < Integer , List < Data > > batch , boolean replaceExistingValues ) { Set < Entry < Integer , List < Data > > > entries = batch . entrySet ( ) ; List < Future > futures = new ArrayList <> ( entries . size ( ) ) ; for ( Entry < Integer , List < Data > > e : entries ) { int partitionId = e . getKey ( ) ; List < Data > keys = e . getValue ( ) ; MapOperation op = operationProvider . createLoadAllOperation ( mapName , keys , replaceExistingValues ) ; InternalCompletableFuture < Object > future = opService . invokeOnPartition ( SERVICE_NAME , op , partitionId ) ; futures . add ( future ) ; } return futures ; }
Sends the key batches to the partition owners for value loading . The returned futures represent pending offloading of the value loading on the partition owner . This means that once the partition owner receives the keys it will offload the value loading task and return immediately thus completing the future . The future does not mean the value loading tasks have been completed or that the entries have been loaded and put into the record store .