|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 PageReports. |
protected String |
getRequestKey()
|
Collection |
getStatistics()
Collection of Reports. |
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 ContextualizableContextExceptionContextualizable.contextualize(org.apache.avalon.framework.context.Context)
public void service(ServiceManager aManager)
throws ServiceException
service in interface ServiceableServiceExceptionServiceable.service(org.apache.avalon.framework.service.ServiceManager)public void dispose()
dispose in interface DisposableDisposable.dispose()public void addStatistics(Statistics stats)
Collector
addStatistics in interface CollectorCollector.addStatistics(org.apache.cocoon.profiling.statistics.Statistics)public Collection getStatistics()
CollectorReports.
getStatistics in interface CollectorCollector.getStatistics()public Collection getPageReports()
CollectorPageReports.
getPageReports in interface CollectorCollector.getPageReports()public boolean isCollectingStatistics()
isCollectingStatistics in interface CollectorCollector.isCollectingStatistics()public void setCollectingStatistics(boolean value)
setCollectingStatistics in interface CollectorCollector.setCollectingStatistics(boolean)public void clear()
clear in interface Collectorclear in interface StoreCollector.clear()protected String getRequestKey()
public boolean containsKey(Object arg0)
containsKey in interface StoreStore.containsKey(java.lang.Object)public void free()
free in interface StoreStore.free()public Object get(Object arg0)
get in interface StoreStore.get(java.lang.Object)public Enumeration keys()
keys in interface StoreStore.keys()public void remove(Object arg0)
remove in interface StoreStore.remove(java.lang.Object)public int size()
size in interface StoreStore.size()
public void store(Object arg0,
Object arg1)
throws IOException
store in interface StoreIOExceptionStore.store(java.lang.Object, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||