simtools.data.async
Class StreamingTSDataSourceCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by simtools.data.DataSourceCollection
                  extended by simtools.data.async.TimeStampedDataSourceCollection
                      extended by simtools.data.async.StreamingTSDataSourceCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Direct Known Subclasses:
StreamingMSDataPlugin.SourceCollection, StreamingTSDataPlugin.SourceCollection

public abstract class StreamingTSDataSourceCollection
extends TimeStampedDataSourceCollection

A streaming time stamped data source collection to handle a list of streaming time stamped data source coming from one data stream

Author:
Claude Cazenave
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class simtools.data.async.TimeStampedDataSourceCollection
TimeStampedDataSourceCollection.InvalidFormatException
 
Nested classes/interfaces inherited from class simtools.data.DataSourceCollection
DataSourceCollection.Container
 
Field Summary
protected  int _maxSize
          The max buffer size
protected  double _minDuration
          The default minimum duration (see StreamingTSDataSource.
protected  int _minSize
          The default initial buffer size
static java.lang.String ID_MARKER
           
 
Fields inherited from class simtools.data.async.TimeStampedDataSourceCollection
_container, _end, _start, ID_DATE_FORMAT, timeStampedDateFormat
 
Fields inherited from class simtools.data.DataSourceCollection
buffers, endNotificationListeners, lastIndex, listeners, map, startIndex
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
StreamingTSDataSourceCollection()
           
StreamingTSDataSourceCollection(java.util.Date start, java.util.Date end)
           
 
Method Summary
protected  void add(java.lang.String data, double t, double v)
           
protected  void add(java.lang.String data, double t, double v, double t2)
           
protected  void add(java.lang.String data, double t, double v, double t2, boolean isTime2Enabled)
           
 double getDoubleValue(int i, long index)
          Optimized accessor for double values.
 DataInfo getInformation()
           
 java.lang.Object getValue(int i, long index)
          Methods for subclasses to specialize
 
Methods inherited from class simtools.data.async.TimeStampedDataSourceCollection
computeMax, computeMin, getCollectionContainers, getEnd, getInformation, getMax, getMin, getStart, isCompound, setEnd, setStart, valueClass
 
Methods inherited from class simtools.data.DataSourceCollection
addEndNotificationListener, addListener, attachBuffer, bufferize, bufferize, bufferize, computeLastIndex, computeLastIndex, computeStartIndex, computeStartIndex, get, getByteMax, getByteMin, getByteValue, getDoubleMax, getDoubleMin, getFloatMax, getFloatMin, getFloatValue, getIntegerMax, getIntegerMin, getIntegerValue, getKind, getLastIndex, getLastIndex, getLongMax, getLongMin, getLongValue, getShortMax, getShortMin, getShortValue, getStartIndex, getStartIndex, hashCode, isComparable, notifyEndNotificationListeners, notifyListenersForCollectionRemoved, notifyListenersForDataSourceAdded, notifyListenersForDataSourceRemoved, notifyListenersForInfoChange, removeAllElements, removeEndNotificationListener, removeListener, setSlice, sortedOrder
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

ID_MARKER

public static final java.lang.String ID_MARKER
See Also:
Constant Field Values

_minDuration

protected double _minDuration
The default minimum duration (see StreamingTSDataSource._minDuration)


_minSize

protected int _minSize
The default initial buffer size


_maxSize

protected int _maxSize
The max buffer size

Constructor Detail

StreamingTSDataSourceCollection

public StreamingTSDataSourceCollection(java.util.Date start,
                                       java.util.Date end)
                                throws java.io.IOException,
                                       TimeStampedDataSourceCollection.InvalidFormatException
Parameters:
start -
end -
Throws:
java.io.IOException
InvalidFormatException
TimeStampedDataSourceCollection.InvalidFormatException

StreamingTSDataSourceCollection

public StreamingTSDataSourceCollection()
                                throws java.io.IOException,
                                       TimeStampedDataSourceCollection.InvalidFormatException
Throws:
java.io.IOException
InvalidFormatException
TimeStampedDataSourceCollection.InvalidFormatException
Method Detail

getValue

public java.lang.Object getValue(int i,
                                 long index)
                          throws DataException
Description copied from class: DataSourceCollection
Methods for subclasses to specialize

Specified by:
getValue in class TimeStampedDataSourceCollection
Throws:
DataException

getDoubleValue

public double getDoubleValue(int i,
                             long index)
                      throws DataException
Description copied from class: DataSourceCollection
Optimized accessor for double values. Works the same way as provider functions.

Specified by:
getDoubleValue in class TimeStampedDataSourceCollection
Throws:
DataException

getInformation

public DataInfo getInformation()
Specified by:
getInformation in class TimeStampedDataSourceCollection

add

protected void add(java.lang.String data,
                   double t,
                   double v)

add

protected void add(java.lang.String data,
                   double t,
                   double v,
                   double t2)

add

protected void add(java.lang.String data,
                   double t,
                   double v,
                   double t2,
                   boolean isTime2Enabled)