org.garret.perst
Class TimeSeries.Block
java.lang.Object
org.garret.perst.Persistent
org.garret.perst.TimeSeries.Block
- All Implemented Interfaces:
- java.io.Externalizable, IPersistent, java.io.Serializable
- Enclosing class:
- TimeSeries<T extends TimeSeries.Tick>
- public abstract static class TimeSeries.Block
- extends Persistent
Abstract base class for time series block.
Progammer has to define its own block class derived from this class
containign array of time series elements and providing getTicks()
method to access this array. It is better no to initialize this array in constructor
(because it will be also used when block will be loaded from the disk),
but check in getTicks() method that array is null, and if so - create new array.
- See Also:
- Serialized Form
| Methods inherited from class org.garret.perst.Persistent |
assignOid, deallocate, equals, getOid, getStorage, hashCode, invalidate, isDeleted, isModified, isPersistent, isRaw, load, loadAndModify, makePersistent, modify, onLoad, onStore, readExternal, recursiveLoading, store, writeExternal |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
timestamp
public long timestamp
used
public int used
TimeSeries.Block
public TimeSeries.Block()
getTicks
public abstract TimeSeries.Tick[] getTicks()
- Get time series elements stored in this block.
- Returns:
- preallocated array of time series element. Only
used
items of this array actually contains time series elements.
But all array items should be not null and conain referen to Tick object.