public class ScopeFilter extends Object implements CacheEventFilter<ScopedState,Object>, Predicate<ScopedState>
ScopedState that allows listeners of the global state cache to choose events by scope.| Modifier and Type | Class and Description |
|---|---|
static class |
ScopeFilter.Externalizer |
| Constructor and Description |
|---|
ScopeFilter(String scope) |
| Modifier and Type | Method and 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitformatpublic ScopeFilter(String scope)
public boolean accept(ScopedState key, Object oldValue, Metadata oldMetadata, Object newValue, Metadata newMetadata, EventType eventType)
CacheEventFilteraccept in interface CacheEventFilter<ScopedState,Object>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 raisedpublic boolean test(ScopedState key)
test in interface Predicate<ScopedState>Copyright © 2021 JBoss by Red Hat. All rights reserved.