Search in sources :

Example 1 with ClusterListenerRemoveCallable

use of org.infinispan.notifications.cachelistener.cluster.ClusterListenerRemoveCallable in project infinispan by infinispan.

the class CacheNotifierImpl method removeListenerAsync.

@Override
public CompletionStage<Void> removeListenerAsync(Object listener) {
    removeListenerFromMaps(listener);
    UUID id = clusterListenerIDs.remove(listener);
    if (id != null) {
        return clusterExecutor.submitConsumer(new ClusterListenerRemoveCallable(cache.wired().getName(), id), (a, ignore, t) -> {
            if (t != null) {
                throw new CacheException(t);
            }
        });
    }
    return CompletableFutures.completedNull();
}
Also used : ClusterListenerRemoveCallable(org.infinispan.notifications.cachelistener.cluster.ClusterListenerRemoveCallable) CacheException(org.infinispan.commons.CacheException) UUID(java.util.UUID)

Aggregations

UUID (java.util.UUID)1 CacheException (org.infinispan.commons.CacheException)1 ClusterListenerRemoveCallable (org.infinispan.notifications.cachelistener.cluster.ClusterListenerRemoveCallable)1