private Operation createLoadAllOperation(List<Data> keys, boolean replaceExistingValues) { return operationProvider.createLoadAllOperation(name, keys, replaceExistingValues); }
private Operation createLoadAllOperation(List<Data> keys, boolean replaceExistingValues) { return operationProvider.createLoadAllOperation(name, keys, replaceExistingValues); }
@Override public MapOperation createLoadAllOperation(String name, List<Data> keys, boolean replaceExistingValues) { return getDelegate().createLoadAllOperation(name, keys, replaceExistingValues); }
@Override public MapOperation createLoadAllOperation(String name, List<Data> keys, boolean replaceExistingValues) { return getDelegate().createLoadAllOperation(name, keys, replaceExistingValues); }
/** * 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. * * @param batch a map from partition ID to a batch of keys for that partition * @param replaceExistingValues if the existing entries for the loaded keys should be replaced * @return a list of futures representing pending completion of the value offloading task */ private List<Future> sendBatch(Map<Integer, List<Data>> batch, boolean replaceExistingValues) { Set<Entry<Integer, List<Data>>> entries = batch.entrySet(); List<Future> futures = new ArrayList<Future>(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. * * @param batch a map from partition ID to a batch of keys for that partition * @param replaceExistingValues if the existing entries for the loaded keys should be replaced * @return a list of futures representing pending completion of the value offloading task */ private List<Future> sendBatch(Map<Integer, List<Data>> batch, boolean replaceExistingValues) { Set<Entry<Integer, List<Data>>> entries = batch.entrySet(); List<Future> futures = new ArrayList<Future>(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; }