biz.hammurapi.metrics.persistent
Class PeriodFactory
java.lang.Object
biz.hammurapi.metrics.persistent.PeriodFactory
- Direct Known Subclasses:
- MemoryCachingPeriodFactory
public class PeriodFactory
- extends java.lang.Object
- Author:
- Pavel Vlasov
Constructor Summary |
PeriodFactory(biz.hammurapi.sql.SQLProcessor processor)
|
Method Summary |
protected biz.hammurapi.cache.Cache |
createCache()
Override this method to create caching period factory |
Period |
getPeriod(int id,
long from,
long to,
int slices,
boolean shrink)
|
protected biz.hammurapi.cache.Producer |
getProducer()
Producer to be used by cache. |
SyntheticPeriod |
getRootPeriod(long from,
long to,
int slices,
boolean shrink)
|
SyntheticPeriod |
newSyntheticPeriod(java.lang.String name,
int[] ids,
long from,
long to,
int slices,
boolean shrink)
|
void |
stop()
Shuts down cache, if any. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeriodFactory
public PeriodFactory(biz.hammurapi.sql.SQLProcessor processor)
createCache
protected biz.hammurapi.cache.Cache createCache()
- Override this method to create caching period factory
- Returns:
getPeriod
public Period getPeriod(int id,
long from,
long to,
int slices,
boolean shrink)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getRootPeriod
public SyntheticPeriod getRootPeriod(long from,
long to,
int slices,
boolean shrink)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getProducer
protected biz.hammurapi.cache.Producer getProducer()
- Producer to be used by cache.
- Returns:
newSyntheticPeriod
public SyntheticPeriod newSyntheticPeriod(java.lang.String name,
int[] ids,
long from,
long to,
int slices,
boolean shrink)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
stop
public void stop()
throws biz.hammurapi.config.ConfigurationException
- Shuts down cache, if any.
- Throws:
biz.hammurapi.config.ConfigurationException
Copyright © 2006 Hammurapi Group. All Rights Reserved.