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

org.infinispan.notifications.cachelistener.cluster.ClusterEventManager Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.notifications.cachelistener.cluster;

import java.util.Collection;
import java.util.UUID;

import org.infinispan.commons.CacheException;
import org.infinispan.remoting.transport.Address;

public interface ClusterEventManager {
   /**
    * Adds additional cluster events that need to be sent remotely for an event originating locally.
    * These events are not sent at time of registering but rather after the {@link ClusterEventManager#sendEvents()} is invoked.
    * These events are gathered on a per thread basis and batched to reduce number of RPCs required. 
    * @param target The target node this event was meant for
    * @param identifier The cluster listener that is identified for these events
    * @param events The events that were generated
    * @param sync Whether these events need to be sent synchronously or not
    */
   public void addEvents(Address target, UUID identifier, Collection> events, boolean sync);
   
   /**
    * Sends all previously added events on this thread
    */
   public void sendEvents() throws CacheException;
   
   /**
    * Drops and ignores all previously added events on this thread.
    */
   public void dropEvents();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy