org.lsst.ccs.localdb.statusdb.trendServer
Class DataServer

java.lang.Object
  extended by org.lsst.ccs.localdb.statusdb.trendServer.DataServer

@Singleton
public class DataServer
extends Object

The DataServer receives requests for trending data analysis. It delivers the requested data as the result of requests to the database.


Nested Class Summary
static class DataServer.ChannelMetadataList
           
 
Field Summary
static org.hibernate.SessionFactory fac
           
 
Constructor Summary
DataServer()
           
 
Method Summary
protected  Data exportRawData(long rawId, long t1, long t2)
           
protected  Data exportStatDataFromRaw(long rawId, long t1, long t2, int nsamples)
           
protected  Data exportStatDataFromStat(long rawId, long id, long t1, long t2, int nsamples)
           
protected  long getAvailableRawData(long rawId, long t1, long t2)
           
protected  Map<StatDesc,Long> getAvailableStats(long rawId, long t1, long t2)
           
 DataChannel.DataChannelList getChannels()
           
 ArrayList<DataChannel> getChannels(String subsystemName)
           
 DataChannel[] getChannels(String partialPath, int level)
           
 DataChannel[] getChannelsByKeywork(String keyword)
          Return all available channels for a given keyword.
 Data getData(int id, long t1, long t2, String flavor, int nbins)
           
 List<ChannelMetaData> getMetadata(int channelId)
           
 List<ChannelMetaData> getMetadata(int channelId, long t1, long t2)
           
 DataServer.ChannelMetadataList getMetadataList(int channelId)
           
protected  List<RawData> getRawData(long id, long t1, long t2)
           
protected  List<StatData> getStatData(long id, long t1, long t2)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fac

public static org.hibernate.SessionFactory fac
Constructor Detail

DataServer

public DataServer()
Method Detail

getData

public Data getData(int id,
                    long t1,
                    long t2,
                    String flavor,
                    int nbins)

getMetadata

public List<ChannelMetaData> getMetadata(int channelId)

getMetadata

public List<ChannelMetaData> getMetadata(int channelId,
                                         long t1,
                                         long t2)

getMetadataList

public DataServer.ChannelMetadataList getMetadataList(int channelId)

getChannels

public DataChannel.DataChannelList getChannels()
Returns:
the whole channels list for all CCS.

getChannels

public ArrayList<DataChannel> getChannels(String subsystemName)
Parameters:
subsystemName -
Returns:
a channels list for a subsystem

getChannels

public DataChannel[] getChannels(String partialPath,
                                 int level)
Parameters:
partialPath -
level -
Returns:
the list of channels within a partial path and a level

getChannelsByKeywork

public DataChannel[] getChannelsByKeywork(String keyword)
Return all available channels for a given keyword.

Parameters:
keyword -
Returns:
channels list

getAvailableStats

protected Map<StatDesc,Long> getAvailableStats(long rawId,
                                               long t1,
                                               long t2)

getAvailableRawData

protected long getAvailableRawData(long rawId,
                                   long t1,
                                   long t2)

getRawData

protected List<RawData> getRawData(long id,
                                   long t1,
                                   long t2)

getStatData

protected List<StatData> getStatData(long id,
                                     long t1,
                                     long t2)

exportRawData

protected Data exportRawData(long rawId,
                             long t1,
                             long t2)

exportStatDataFromRaw

protected Data exportStatDataFromRaw(long rawId,
                                     long t1,
                                     long t2,
                                     int nsamples)

exportStatDataFromStat

protected Data exportStatDataFromStat(long rawId,
                                      long id,
                                      long t1,
                                      long t2,
                                      int nsamples)

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


Copyright © 2013 LSST. All Rights Reserved.