Package org.infinispan.globalstate
Class ScopeFilter
java.lang.Object
org.infinispan.globalstate.ScopeFilter
- All Implemented Interfaces:
Predicate<ScopedState>
,CacheEventFilter<ScopedState,
Object>
public class ScopeFilter
extends Object
implements CacheEventFilter<ScopedState,Object>, Predicate<ScopedState>
A filter for
ScopedState
that allows listeners of the global state cache to choose events by scope.-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(ScopedState key, Object oldValue, Metadata oldMetadata, Object newValue, Metadata newMetadata, EventType eventType) Whether or not this event should be raised to the listener it is attached to.boolean
test
(ScopedState key) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.notifications.cachelistener.filter.CacheEventFilter
format
-
Constructor Details
-
ScopeFilter
-
-
Method Details
-
accept
public boolean accept(ScopedState key, Object oldValue, Metadata oldMetadata, Object newValue, Metadata newMetadata, EventType eventType) Description copied from interface:CacheEventFilter
Whether or not this event should be raised to the listener it is attached to.- Specified by:
accept
in interfaceCacheEventFilter<ScopedState,
Object> - Parameters:
key
- The key for the entry that was changed for the eventoldValue
- The previous value before the event takes placeoldMetadata
- The old value before the event takes placenewValue
- The new value for the entry after the event takes placenewMetadata
- The new metadata for the entry after the event takes placeeventType
- The type of event that is being raised- Returns:
- Whether or not to notify the listener
-
test
- Specified by:
test
in interfacePredicate<ScopedState>
-