|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.profiling.statistics.CollectorImpl
public class CollectorImpl
Implementation for the statistics component. In order to prevent an out of memory exception we implement the Store interface (dummy implementation) so we can register this component with the StoreJanitor component which will invoke this component to free memory in case of low memory.
Field Summary | |
---|---|
protected Context |
context
The component context. |
protected boolean |
isCollecting
Are we currently collecting? |
protected StoreJanitor |
janitor
The store janitor for registering ourself. |
protected ServiceManager |
manager
The service manager. |
protected Map |
pageReports
All page reports. |
protected Map |
reports
All reports. |
Fields inherited from interface org.apache.excalibur.store.Store |
---|
PERSISTENT_STORE, ROLE, TRANSIENT_STORE |
Constructor Summary | |
---|---|
CollectorImpl()
|
Method Summary | |
---|---|
void |
addStatistics(Statistics stats)
Add a new statistics object. |
void |
clear()
|
boolean |
containsKey(Object arg0)
|
void |
contextualize(Context c)
|
void |
dispose()
|
void |
free()
|
Object |
get(Object arg0)
|
Collection |
getPageReports()
Collection of PageReport s. |
protected String |
getRequestKey()
|
Collection |
getStatistics()
Collection of Report s. |
boolean |
isCollectingStatistics()
|
Enumeration |
keys()
|
void |
remove(Object arg0)
|
void |
service(ServiceManager aManager)
|
void |
setCollectingStatistics(boolean value)
|
int |
size()
|
void |
store(Object arg0,
Object arg1)
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isCollecting
protected Map reports
protected Map pageReports
protected StoreJanitor janitor
protected ServiceManager manager
protected Context context
Constructor Detail |
---|
public CollectorImpl()
Method Detail |
---|
public void contextualize(Context c) throws ContextException
contextualize
in interface Contextualizable
ContextException
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)
public void service(ServiceManager aManager) throws ServiceException
service
in interface Serviceable
ServiceException
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
public void dispose()
dispose
in interface Disposable
Disposable.dispose()
public void addStatistics(Statistics stats)
Collector
addStatistics
in interface Collector
Collector.addStatistics(org.apache.cocoon.profiling.statistics.Statistics)
public Collection getStatistics()
Collector
Report
s.
getStatistics
in interface Collector
Collector.getStatistics()
public Collection getPageReports()
Collector
PageReport
s.
getPageReports
in interface Collector
Collector.getPageReports()
public boolean isCollectingStatistics()
isCollectingStatistics
in interface Collector
Collector.isCollectingStatistics()
public void setCollectingStatistics(boolean value)
setCollectingStatistics
in interface Collector
Collector.setCollectingStatistics(boolean)
public void clear()
clear
in interface Collector
clear
in interface Store
Collector.clear()
protected String getRequestKey()
public boolean containsKey(Object arg0)
containsKey
in interface Store
Store.containsKey(java.lang.Object)
public void free()
free
in interface Store
Store.free()
public Object get(Object arg0)
get
in interface Store
Store.get(java.lang.Object)
public Enumeration keys()
keys
in interface Store
Store.keys()
public void remove(Object arg0)
remove
in interface Store
Store.remove(java.lang.Object)
public int size()
size
in interface Store
Store.size()
public void store(Object arg0, Object arg1) throws IOException
store
in interface Store
IOException
Store.store(java.lang.Object, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |