All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.interceptors.distribution.Collector Maven / Gradle / Ivy

package org.infinispan.interceptors.distribution;

import java.util.concurrent.CompletableFuture;

/**
 * Represents the ack collector for a write operation in triangle algorithm.
 *
 * @author Pedro Ruivo
 * @since 9.0
 */
public interface Collector {

   /**
    * @return The {@link CompletableFuture} that will be completed when all the acks are received.
    */
   CompletableFuture getFuture();

   /**
    * The exception results of the primary owner.
    *
    * @param throwable the {@link Throwable} throw by the primary owner
    */
   void primaryException(Throwable throwable);

   /**
    * The write operation's return value.
    *
    * @param result  the operation's return value
    * @param success {@code true} if it was successful, {@code false} otherwise (for conditional operations).
    */
   void primaryResult(T result, boolean success);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy