simtools.data.async
Class StreamingTSDataSource.StreamingTimeSource

java.lang.Object
  extended by simtools.data.ValueProvider
      extended by simtools.data.DataSource
          extended by simtools.data.async.TimeStampedDataSource.TimeSource
              extended by simtools.data.async.StreamingTSDataSource.StreamingTimeSource
Enclosing class:
StreamingTSDataSource

public class StreamingTSDataSource.StreamingTimeSource
extends TimeStampedDataSource.TimeSource


Field Summary
protected  java.lang.String type
           
 
Fields inherited from class simtools.data.async.TimeStampedDataSource.TimeSource
info
 
Fields inherited from class simtools.data.DataSource
endNotificationListeners, listeners, sortedOrder
 
Fields inherited from class simtools.data.ValueProvider
ByteProvider, DoubleProvider, FloatProvider, IntegerProvider, kind, LongProvider, ObjectProvider, ShortProvider
 
Constructor Summary
StreamingTSDataSource.StreamingTimeSource(java.lang.String type)
           
StreamingTSDataSource.StreamingTimeSource(java.lang.String type, java.lang.String name)
           
 
Method Summary
 double getDoubleValue(long index)
          Optimized accessor for double values.
 java.lang.Object getMax()
           
 java.lang.Object getMin()
          Return values if possibly only, without expensive computations.
 java.lang.Object getValue(long index)
           
 
Methods inherited from class simtools.data.async.TimeStampedDataSource.TimeSource
getInformation, getLastIndex, getStartIndex, isAuxiliary, sortedOrder
 
Methods inherited from class simtools.data.DataSource
addEndNotificationListener, addListener, computeLastIndex, computeMax, computeMin, computeSortedOrder, computeStartIndex, createEmptyDataSource, equals, getAuxiliarySources, getByteMax, getByteMin, getChoiceFormat, getDataSourceInformationClass, getDoubleMax, getDoubleMin, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, isComparable, isCompound, notifyEndNotificationListeners, notifyListenersForDataReplaced, notifyListenersForDataReplaced, notifyListenersForIndexRangeChange, notifyListenersForInfoChange, notifyListenersForOrderChange, notifyListenersForValueChange, notifyListenersForValueRangeChange, removeEndNotificationListener, removeListener, setSlice, updateSortedOrder
 
Methods inherited from class simtools.data.ValueProvider
getByteValue, getFloatValue, getIntegerValue, getKind, getLongValue, getObjectValue, getShortValue, valueClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected java.lang.String type
Constructor Detail

StreamingTSDataSource.StreamingTimeSource

public StreamingTSDataSource.StreamingTimeSource(java.lang.String type,
                                                 java.lang.String name)
                                          throws java.io.IOException,
                                                 TimeStampedDataSourceCollection.InvalidFormatException
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException

StreamingTSDataSource.StreamingTimeSource

public StreamingTSDataSource.StreamingTimeSource(java.lang.String type)
                                          throws java.io.IOException,
                                                 TimeStampedDataSourceCollection.InvalidFormatException
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException
Method Detail

getValue

public java.lang.Object getValue(long index)
                          throws DataException
Specified by:
getValue in class TimeStampedDataSource.TimeSource
Throws:
DataException

getDoubleValue

public double getDoubleValue(long index)
                      throws DataException
Description copied from class: ValueProvider
Optimized accessor for double values. If the provider can provide doubles directly, then it should override this method. Otherwise, the default implementation will do its best to convert the Object returned by getValue() to a double. This conversion also parses strings, and returns 0 if it failed. An exception is thrown if, and only if, getValue throws it.

Specified by:
getDoubleValue in class TimeStampedDataSource.TimeSource
Throws:
DataException

getMin

public java.lang.Object getMin()
                        throws UnsupportedOperation
Description copied from class: DataSource
Return values if possibly only, without expensive computations.

Overrides:
getMin in class TimeStampedDataSource.TimeSource
Throws:
UnsupportedOperation

getMax

public java.lang.Object getMax()
                        throws UnsupportedOperation
Overrides:
getMax in class TimeStampedDataSource.TimeSource
Throws:
UnsupportedOperation