Ejemplo n.º 1
0
 @Override
 public <K, V> WriteOnlyManyEntriesCommand<K, V> buildWriteOnlyManyEntriesCommand(
     Map<? extends K, ? extends V> entries, BiConsumer<V, WriteEntryView<V>> f, Params params) {
   WriteOnlyManyEntriesCommand<K, V> cmd = new WriteOnlyManyEntriesCommand<>(entries, f);
   cmd.setParams(params);
   return cmd;
 }
 @Override
 public CompletableFuture<Void> visitWriteOnlyManyEntriesCommand(
     InvocationContext ctx, WriteOnlyManyEntriesCommand command) throws Throwable {
   for (Object key : command.getEntries().keySet()) {
     if (shouldWrap(key, ctx, command)) {
       // the put map never reads the keys
       entryFactory.wrapEntryForWriting(ctx, key, EntryFactory.Wrap.WRAP_ALL, true, false);
     }
   }
   return setSkipRemoteGetsAndInvokeNextForPutMapCommand(ctx, command);
 }
 @Override
 public BasicInvocationStage visitWriteOnlyManyEntriesCommand(
     InvocationContext ctx, WriteOnlyManyEntriesCommand command) throws Throwable {
   return handleWriteManyCommand(ctx, command, command.getAffectedKeys(), command.isForwarded());
 }