public class InMemoryConsumerRegistry extends AbstractConsumerRegistry
AbstractConsumerRegistry.InMemoryConsumerCache, AbstractConsumerRegistry.ProducerInfoIteratorconsumerCache, log| Constructor and Description |
|---|
InMemoryConsumerRegistry() |
| Modifier and Type | Method and Description |
|---|---|
WSRPConsumer |
createConsumerFrom(ProducerInfo producerInfo,
boolean putInCache)
Creates a consumer from the specified ProducerInfo, caching it if so specified.
|
void |
delete(ProducerInfo info)
Deletes the specified ProducerInfo from persistence.
|
Collection<String> |
getConfiguredConsumersIds()
Retrieves the identifiers for all known consumers.
|
Iterator<ProducerInfo> |
getProducerInfosFromStorage()
Retrieves all ProducerInfos currently persisted from the persistent store.
|
protected void |
initConsumerCache()
Initializes the ConsumerCache so that subclasses have the opportunity to do some specific processing.
|
protected void |
initConsumers(SortedMap<String,WSRPConsumer> consumers) |
ProducerInfo |
loadProducerInfo(String id)
Loads the ProducerInfo associated with the specified identifier from the persistent state.
|
void |
reloadConsumers()
Reloads consumers from persistence, re-initializing any cache from the persisted state.
|
void |
save(ProducerInfo info,
String messageOnError)
Saves for the first time the specified ProducerInfo to persistence, providing a message in case an error happens.
|
void |
stop()
Stops all consumers, deregistering them with the FederatingPortletInvoker.
|
String |
update(ProducerInfo producerInfo)
Persists the changes made to an already persisted ProducerInfo.
|
String |
updateProducerInfo(ProducerInfo producerInfo)
Persists the changes made to ProducerInfo.
|
activateConsumer, activateConsumerWith, containsConsumer, createConsumer, deactivateConsumer, deactivateConsumerWith, deregisterWithFederatingPortletInvoker, destroyConsumer, getConfiguredConsumerNumber, getConfiguredConsumers, getConsumer, getConsumers, getFederatingPortletInvoker, getMigrationService, getPersistedLastModifiedForProducerInfoWith, getSessionRegistry, registerOrDeregisterConsumerWith, registerWithFederatingPortletInvoker, setConsumerCache, setFederatingPortletInvoker, setMigrationService, setSessionEventBroadcaster, setSessionRegistry, startprotected void initConsumerCache()
AbstractConsumerRegistryinitConsumerCache in class AbstractConsumerRegistrypublic WSRPConsumer createConsumerFrom(ProducerInfo producerInfo, boolean putInCache)
ConsumerRegistrySPIcreateConsumerFrom in interface ConsumerRegistrySPIcreateConsumerFrom in class AbstractConsumerRegistryproducerInfo - the ProducerInfo to create a consumer fromputInCache - whether to cache the newly created consumerpublic String updateProducerInfo(ProducerInfo producerInfo)
ConsumerRegistryupdateProducerInfo in interface ConsumerRegistryupdateProducerInfo in class AbstractConsumerRegistryproducerInfo - the ProducerInfo to persistnull otherwisepublic void save(ProducerInfo info, String messageOnError)
ConsumerRegistrySPIinfo - the ProducerInfo to persistmessageOnError - the message to pass along in case an error happenspublic void delete(ProducerInfo info)
ConsumerRegistrySPIinfo - the ProducerInfo to deletepublic String update(ProducerInfo producerInfo)
ConsumerRegistrySPIproducerInfo - the ProducerInfo which modifications we want to persistnull otherwisepublic void reloadConsumers()
ConsumerRegistryreloadConsumers in interface ConsumerRegistryreloadConsumers in class AbstractConsumerRegistrypublic Iterator<ProducerInfo> getProducerInfosFromStorage()
ConsumerRegistrySPIpublic ProducerInfo loadProducerInfo(String id)
ConsumerRegistrySPIid - the identifier of the ProducerInfo to loadnull if no such ProducerInfo is currently persistedpublic void stop()
throws Exception
ConsumerRegistrySPIstop in interface ConsumerRegistrySPIstop in class AbstractConsumerRegistryExceptionpublic Collection<String> getConfiguredConsumersIds()
ConsumerRegistryprotected void initConsumers(SortedMap<String,WSRPConsumer> consumers)
Copyright © 2006-2014 GateIn. All Rights Reserved.