public interface ClusterRegistry<S,K,V>
\@Inject void setup(ClusterRegistry cs) { ..hold the reference }or directly form the GlobalComponentRegistry:
EmbeddedCacheManager:getGlobalComponentRegistry():getGlobalComponent(ClusterRegistry.class)
Modifier and Type | Method and Description |
---|---|
void |
addListener(S scope,
KeyFilter keyFilter,
Object listener)
Adds a listener that is notified of changes to keys in a given scope and which match a given
KeyFilter . |
void |
addListener(S scope,
Object listener)
Adds a listener that is notified of changes to keys in a given scope.
|
void |
clear(S scope) |
void |
clearAll() |
boolean |
containsKey(S scope,
K key) |
V |
get(S scope,
K key) |
Set<K> |
keys(S scope) |
void |
put(S scope,
K key,
V value) |
void |
put(S scope,
K key,
V value,
long lifespan,
TimeUnit unit) |
void |
remove(S scope,
K key) |
void |
removeListener(Object listener)
Detaches a listener instance.
|
void clear(S scope)
void clearAll()
void addListener(S scope, Object listener)
scope
- the scope to watchlistener
- a properly annotated listener instancevoid addListener(S scope, KeyFilter keyFilter, Object listener)
KeyFilter
.scope
- the scope to watchlistener
- a properly annotated listener instancevoid removeListener(Object listener)
listener
- the listener to detachCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.