protected static class AbstractConsumerRegistry.InMemoryConsumerCache extends Object implements ConsumerCache
| Constructor and Description |
|---|
AbstractConsumerRegistry.InMemoryConsumerCache(ConsumerRegistrySPI registry) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all consumers from this cache.
|
WSRPConsumer |
getConsumer(String id)
Retrieves the consumer identified by the specified identifier, updating its state from persistence if required.
|
Collection<WSRPConsumer> |
getConsumers()
Retrieves the up-to-date collection of consumers known by this cache.
|
void |
initFromStorage()
Initializes this cache from persistent store.
|
boolean |
isInvalidated()
Are we invalidated?
|
void |
putConsumer(String id,
WSRPConsumer consumer)
Puts the specified consumer in cache under the specified identifier.
|
protected void |
refreshIfNeeded()
Refreshes the cache information if needed.
|
WSRPConsumer |
removeConsumer(String id)
Removes the consumer identified by the specified identifier from this cache.
|
void |
setInvalidated(boolean invalidated)
Specifies whether this cache should be invalidated.
|
public AbstractConsumerRegistry.InMemoryConsumerCache(ConsumerRegistrySPI registry)
public void initFromStorage()
ConsumerCacheinitFromStorage in interface ConsumerCachepublic Collection<WSRPConsumer> getConsumers()
ConsumerCachegetConsumers in interface ConsumerCachepublic WSRPConsumer getConsumer(String id)
ConsumerCachegetConsumer in interface ConsumerCacheid - the identifier of the consumer to retrievenull if no such consumer exists in persistencepublic WSRPConsumer removeConsumer(String id)
ConsumerCacheremoveConsumer in interface ConsumerCacheid - the identifier of the consumer to removenull if no such consumer previously was stored in this cachepublic void putConsumer(String id, WSRPConsumer consumer)
ConsumerCacheputConsumer in interface ConsumerCacheid - the consumer's identifierconsumer - the consumer to put in this cachepublic void clear()
ConsumerCacheclear in interface ConsumerCachepublic boolean isInvalidated()
ConsumerCacheisInvalidated in interface ConsumerCachetrue if this cache has been invalidated, false otherwisepublic void setInvalidated(boolean invalidated)
ConsumerCachesetInvalidated in interface ConsumerCacheinvalidated - true to mark this cache as invalidated, false otherwiseprotected void refreshIfNeeded()
Copyright © 2006-2014 GateIn. All Rights Reserved.