|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- type of keys used to identify registry itemsV
- type of values stored in the registrypublic interface ConsumingRegistry<K extends java.io.Serializable,V extends java.io.Serializable>
Generic interface for ConsumingRegistry. ConsumingRegistry
is used to obtain information about items stored in distributed registry.
Since there can be several ProvidingRegistries that publish different
items under the same key, the ConsumingRegistry
allows to
obtain the set of items published by them under the particular key.
ConsumingRegistry
may also indicate that some
items in the registry are invalid (therefore, if there are several
ConsumingRegistries
, they may handle such a
notification).
ProvidingRegistry
Method Summary | |
---|---|
void |
addRegistryEventProcessor(RegistryEventProcessor<K,V> aListener)
Adds listener to list of registered RegistryEventProcessors which performs the further processing of obtained external notifications |
void |
close()
Closes this registry instance and performs all necessary cleanup. |
java.util.Set<V> |
getItems(K aItemKey)
Returns the set of items stored in the distributed registry under given key. |
java.util.Set<K> |
getKeys(boolean aForceRefresh)
Returns list of available keys currently stored in registry (ones which are actually stored in particular instance of consuming registry or all published ones) |
boolean |
isClosed()
Indicated whether registry it in closed state |
boolean |
isDirty(K aItemKey)
Indicates whether there were any changes in distributed registry occurred due to synchronization since the last call of the getItems()
for given key. |
void |
markItemInvalid(K aItemKey,
V aItem)
Provides ability to mark specific item stored in the distributed registry as invalid one. |
void |
removeRegistryEventProcessor(RegistryEventProcessor<K,V> aListener)
Removes listener from list of registered RegistryEventProcessors which performs further processing of obtained external notifications |
void |
requestItems(K aItemKey)
Initiates requesting of items for given key by sending appropriate notifications to ProvidingRegistries |
Method Detail |
---|
boolean isDirty(K aItemKey)
getItems()
for given key.
aItemKey
- key for items
getItems(K)
getItems(K)
java.util.Set<V> getItems(K aItemKey)
aItemKey
- key of items
java.util.Set<K> getKeys(boolean aForceRefresh)
aForceRefresh
- indicates whether request for available items
should be issued to distributed
registry before returning set of key
void markItemInvalid(K aItemKey, V aItem)
ConsumingRegistries in the same
distributed registry, they can be notified of and be handled
properly. It's assumed that this call will not affect
ProvidingRegistries somehow.
- Parameters:
aItemKey
- key of the itemaItem
- the item which should be marked invalid
void requestItems(K aItemKey)
aItemKey
- if null, will request items for all available keysvoid removeRegistryEventProcessor(RegistryEventProcessor<K,V> aListener)
aListener
- processor to be removedvoid addRegistryEventProcessor(RegistryEventProcessor<K,V> aListener)
aListener
- processor to be addedvoid close()
boolean isClosed()
true
if registry instance is closed, false otherwiseclose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |