|
JTemporal Home Tutorial |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jtemporal.WeakTimeSeriesFactory
public class WeakTimeSeriesFactory
Factory for timeseries.
The point is that timeseries values are internally stored in a WeakHashMap, in such
a way that you can globally remove a date from the TimeSeriesMgr to free
the memory of all the TimeSeries simultaenously, for the given date.
The advantage, is that this costly removal is done by the garbage collector
and only if you need memory.
No strong references are held on the timeseries anymore: as soon you unreference them
they are eligible for garbage collection.
By moving the responsability to the gc, the code is quite simple, because
we do not need to perform the old dates removal.
Constructor Summary | |
---|---|
WeakTimeSeriesFactory()
Deprecated. |
Method Summary | |
---|---|
TimeSeries |
getHashTimeSeries()
Deprecated. Creates a new TimeSeries, internally linked to this mgr. |
TimeSeries |
getHashTimeSeries(MissingInstantHandler handler)
Deprecated. Creates a new TimeSeries, internally linked to this mgr. |
void |
weaken(Instant i)
Deprecated. Potentially removes the given instant in all the TimeSeries created by this mgr. |
void |
weaken(Period p)
Deprecated. Potentially removes all the known instant in the given Period range, in all the TimeSeries created by this mgr. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WeakTimeSeriesFactory()
Method Detail |
---|
public TimeSeries getHashTimeSeries()
public TimeSeries getHashTimeSeries(MissingInstantHandler handler)
handler
- the handler used by the TimeSeries
public void weaken(Instant i)
i
- the instant whose entries are to be removed from the timeseries.public void weaken(Period p)
p
- the period defining the range of deletion
|
JTemporal Home Tutorial |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |