public abstract class AbstractActiveCollectionManager extends Object implements ActiveCollectionManager
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractActiveCollectionManager.HouseKeeper
This class implements the housekeeping functionality to
cleanup the top level active collections periodically.
|
| Constructor and Description |
|---|
AbstractActiveCollectionManager()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActiveCollectionListener(ActiveCollectionListener l)
This method registers an active collection listener.
|
protected void |
cleanup()
This method performs the cleanup task on the top level
active collections.
|
void |
close()
This method closes the Active Collection Manager.
|
ActiveCollection |
create(String name,
ActiveCollection parent,
Predicate predicate,
Map<String,Object> properties)
This method derives a local active collection, from the supplied
parent active collection, with the supplied predicate to filter
results from the parent collection.
|
ActiveCollection |
getActiveCollection(String name)
This method returns the active collection associated with the
supplied name, or null if not found.
|
Collection<ActiveCollection> |
getActiveCollections()
This method returns the active collections.
|
long |
getHouseKeepingInterval()
This method gets the house keeping interval.
|
void |
init()
This method initializes the Active Collection Manager.
|
void |
register(ActiveCollectionSource acs)
This method registers the active collection source with
the manager.
|
void |
remove(String name)
This method explicitly removes the named derived active collection
making it unavailable to other clients.
|
void |
removeActiveCollectionListener(ActiveCollectionListener l)
This method unregisters an active collection listener.
|
void |
setHouseKeepingInterval(long interval)
This method sets the house keeping interval.
|
void |
unregister(ActiveCollectionSource acs)
This method unregisters the active collection source from
the manager.
|
public AbstractActiveCollectionManager()
public void init()
public void setHouseKeepingInterval(long interval)
setHouseKeepingInterval in interface ActiveCollectionManagerinterval - The intervalpublic long getHouseKeepingInterval()
getHouseKeepingInterval in interface ActiveCollectionManagerpublic void register(ActiveCollectionSource acs) throws Exception
register in interface ActiveCollectionManageracs - The active collection sourceException - Failed to register the active collection sourcepublic void unregister(ActiveCollectionSource acs) throws Exception
unregister in interface ActiveCollectionManageracs - The active collection sourceException - Failed to unregister the active collection sourcepublic ActiveCollection getActiveCollection(String name)
getActiveCollection in interface ActiveCollectionManagername - The namepublic Collection<ActiveCollection> getActiveCollections()
getActiveCollections in interface ActiveCollectionManagerpublic ActiveCollection create(String name, ActiveCollection parent, Predicate predicate, Map<String,Object> properties)
create in interface ActiveCollectionManagername - The name of the locally maintained collectionparent - The parent active collectionpredicate - The predicate used to filter results from the parent
before they are applied to the childproperties - The optional propertiespublic void remove(String name)
remove in interface ActiveCollectionManagername - The name of the derived collection to be removedprotected void cleanup()
public void addActiveCollectionListener(ActiveCollectionListener l)
addActiveCollectionListener in interface ActiveCollectionManagerl - The active collection listenerpublic void removeActiveCollectionListener(ActiveCollectionListener l)
removeActiveCollectionListener in interface ActiveCollectionManagerl - The active collection listenerpublic void close()
Copyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.