core/src/main/java/org/infinispan/util/concurrent/CommandAckCollector.java
/**
    * Creates a collector for a single key write operation.
    *
    * @param id           the id from {@link CommandInvocationId}.
    * @param backupOwners the backup owners of the key.
    * @param topologyId   the current topology id.
    */
Creates a collector for a single key write operation.
@param id           the id from  CommandInvocationId.
@param backupOwners the backup owners of the key.
@param topologyId   the current topology id.
Creates a collector for a single key write operation . @param id the id from CommandInvocationId . @param backupOwners the backup owners of the key . @param topologyId the current topology id .
public Collector<Object> create(long id, Collection<Address> backupOwners, int topologyId) {
      if (backupOwners.isEmpty()) {
         return new PrimaryOwnerOnlyCollector<>();
      }
      SingleKeyCollector collector = new SingleKeyCollector(id, backupOwners, topologyId);
      collectorMap.put(id, collector);
      if (trace) {
         log.tracef("Created new collector for %s. BackupOwners=%s", id, backupOwners);
      }
      return collector;
   }
public Collector < Object > create ( long id , Collection < Address > backupOwners , int topologyId ) { if ( backupOwners . isEmpty ( ) ) { return new PrimaryOwnerOnlyCollector < > ( ) ; } SingleKeyCollector collector = new SingleKeyCollector ( id , backupOwners , topologyId ) ; collectorMap . put ( id , collector ) ; if ( trace ) { log . tracef ( "Created new collector for %s. BackupOwners=%s" , id , backupOwners ) ; } return collector ; }
Creates a collector for a single key write operation.
Creates a collector for a single key write operation .