org.infinispan.functional.impl.FunctionalNotifier Maven / Gradle / Ivy
package org.infinispan.functional.impl;
import org.infinispan.commons.api.functional.EntryView.ReadEntryView;
import org.infinispan.commons.api.functional.Listeners.ReadWriteListeners;
import org.infinispan.commons.api.functional.Listeners.WriteListeners;
import org.infinispan.commons.util.Experimental;
import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;
import java.util.function.Supplier;
/**
* Listener notifier.
*
* @since 8.0
*/
@Scope(Scopes.NAMED_CACHE)
@Experimental
public interface FunctionalNotifier extends ReadWriteListeners {
/**
* Notify registered {@link ReadWriteListener} instances of the created entry.
*/
void notifyOnCreate(ReadEntryView created);
/**
* Notify registered {@link ReadWriteListener} instances of the modified
* entry passing the previous and new value.
*/
void notifyOnModify(ReadEntryView before, ReadEntryView after);
/**
* Notify registered {@link ReadWriteListener} instances of the removed
* entry passing in the removed entry.
*/
void notifyOnRemove(ReadEntryView removed);
/**
* Notify registered {@link WriteListener} instances of the written entry.
*
* @apiNote By using a {@link Supplier} the entry view can be computed lazily
* only if any listeners has been registered.
*/
void notifyOnWrite(Supplier> write);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy