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 forScopedState
that allows listeners of the global state cache to choose events by scope.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScopeFilter.Externalizer
-
Constructor Summary
Constructors Constructor Description ScopeFilter(String scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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 interface org.infinispan.notifications.cachelistener.filter.CacheEventFilter
format
-
-
-
-
Constructor Detail
-
ScopeFilter
public ScopeFilter(String scope)
-
-
Method Detail
-
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
public boolean test(ScopedState key)
-
-