protected void loadInternal ( Set < K > keys , Iterable < Data > dataKeys , boolean replaceExistingValues ) { if ( dataKeys == null ) { dataKeys = convertToData ( keys ) ; } Map < Integer , List < Data > > partitionIdToKeys = getPartitionIdToKeysMap ( dataKeys ) ; Iterable < Entry < Integer , List < Data > > > entries = partitionIdToKeys . entrySet ( ) ; for ( Entry < Integer , List < Data > > entry : entries ) { Integer partitionId = entry . getKey ( ) ; List < Data > correspondingKeys = entry . getValue ( ) ; Operation operation = createLoadAllOperation ( correspondingKeys , replaceExistingValues ) ; operationService . invokeOnPartition ( SERVICE_NAME , operation , partitionId ) ; } waitUntilLoaded ( ) ; }
Maps keys to corresponding partitions and sends operations to them .