/** * Creates new GradientsAccumulator with custom starting threshold * * @param handler MessageHandler instance that'll be used for communication purposes */ public BasicGradientsAccumulator(int parties, @NonNull MessageHandler handler) { this.gradients = new LinkedTransferQueue<>(); this.handler = handler; this.handler.initialize(this); this.parties = parties; barrier = new CyclicBarrier(parties); }
handler.initialize(this);