|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.elca.el4j.services.statistics.detailed.processing.NonPersistentMeasureCollectorService
public class NonPersistentMeasureCollectorService
This class implements a non-persistant MeasureCollectionSerice. This means that this measure collector service is not backed by any database or file system. All the collected measurements are only stored in the memory. The cacheSize determines the maximum number of MeasureIDs, which are stored. If the no of MeasureIDs, exceeds the cacheSize all MeasureItems belonging to one MeasureId will be removed. This MeasureId for removal is chosen by a least-recently-used strategy.
Field Summary |
---|
Fields inherited from interface ch.elca.el4j.services.statistics.detailed.processing.MeasureCollectorService |
---|
CONTEXT_NAME_ID, CONTEXT_NAME_SEQ |
Constructor Summary | |
---|---|
NonPersistentMeasureCollectorService(int maxCacheSize)
Construtor. |
Method Summary | |
---|---|
void |
add(MeasureItem item)
Adds a new measure. |
void |
delete(int amount)
Deletes all measures. |
List<MeasureItem> |
getAllMeasureItems()
Returns a List of all the measures. |
List<MeasureItem> |
getFirstMeasureItems()
|
void |
writeMeasures()
Won't do anything, as this is a non-persistant MeasureCollectorService. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NonPersistentMeasureCollectorService(int maxCacheSize)
maxCacheSize
- The maximum number of Measurements in the cache.Method Detail |
---|
public void writeMeasures()
writeMeasures
in interface MeasureCollectorService
public void add(MeasureItem item)
add
in interface MeasureCollectorService
item
- the measure to addpublic void delete(int amount)
delete
in interface MeasureCollectorService
amount
- Dummy paramater, not used for non persistant collector (will
simply be ignored). Perhaps required later if other
CollectorServices are also ported.public List<MeasureItem> getAllMeasureItems()
getAllMeasureItems
in interface MeasureCollectorService
public List<MeasureItem> getFirstMeasureItems()
getFirstMeasureItems
in interface MeasureCollectorService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |