Skip to content

Commit

Permalink
tubedb version; api and web ui version info
Browse files Browse the repository at this point in the history
  • Loading branch information
swoellauer committed Jul 5, 2017
1 parent ca6cea9 commit 2282223
Show file tree
Hide file tree
Showing 6 changed files with 1,404 additions and 1,385 deletions.
2 changes: 2 additions & 0 deletions src/tsdb/TsDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*/
public class TsDB implements AutoCloseable {
private static final Logger log = LogManager.getLogger();

public static final String tubedb_version = "1.0.0";

/**
* map regionName -> Region
Expand Down
197 changes: 100 additions & 97 deletions src/tsdb/remote/RemoteTsDB.java
Original file line number Diff line number Diff line change
@@ -1,97 +1,100 @@
package tsdb.remote;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

import tsdb.component.LoggerType;
import tsdb.component.Region;
import tsdb.component.Sensor;
import tsdb.component.SourceEntry;
import tsdb.util.AggregationInterval;
import tsdb.util.DataQuality;
import tsdb.util.Pair;
import tsdb.util.TimeSeriesMask;
import tsdb.util.TimestampInterval;
import tsdb.util.iterator.TimestampSeries;

/**
* Remote interface of TsDB, callable locally or by RMI
* @author woellauer
*
*/
public interface RemoteTsDB extends Remote {

//sensor
/**
* plotID format:
* <br>
* for plot or virtual plot: PLOT_ID
* <br>
* for virtual plot of one station: PLOT_ID:STATION_ID
* <br>
* for one station: STATION_ID
*
*/
String[] getSensorNamesOfPlotWithVirtual(String plotID) throws RemoteException;
String[] getSensorNamesOfGeneralStationWithVirtual(String generalStationName) throws RemoteException;
Sensor[] getSensors() throws RemoteException;
Sensor getSensor(String sensorName) throws RemoteException;
String[] getBaseSchema(String[] rawSchema) throws RemoteException;
String[] getCacheSchemaNames(String streamName) throws RemoteException;
String[] getValidSchema(String plotID, String[] sensorNames) throws RemoteException;
String[] getValidSchemaWithVirtualSensors(String plotID, String[] sensorNames) throws RemoteException;
String[] supplementSchema(String[] schema, String[] availableSchema) throws RemoteException;

//region
Region[] getRegions() throws RemoteException;
Region getRegionByName(String name) throws RemoteException;
@Deprecated
String[] getRegionLongNames() throws RemoteException;
@Deprecated
Region getRegionByLongName(String longName) throws RemoteException;
Region getRegionByPlot(String plotID) throws RemoteException;

//general station
GeneralStationInfo[] getGeneralStations() throws RemoteException;
GeneralStationInfo[] getGeneralStationsOfRegion(String regionName) throws RemoteException;
@Deprecated
String[] getGeneralStationLongNames(String regionName) throws RemoteException;

//plot station virtualPlot
PlotInfo[] getPlots() throws RemoteException;
StationInfo[] getStations() throws RemoteException;
String getStationLoggerTypeName(String stationName) throws RemoteException;
String[] getPlotStations(String plotID) throws RemoteException;
VirtualPlotInfo[] getVirtualPlots() throws RemoteException;
VirtualPlotInfo getVirtualPlot(String plotID) throws RemoteException;
String[] getStationNames() throws RemoteException;
String[] cacheStorageGetStreamNames() throws RemoteException;
String[] getPlotIDsByGeneralStationByLongName(String longName) throws RemoteException;
ArrayList<TimestampInterval<String>> getPlotTimeSpans() throws RemoteException;
ArrayList<TimestampInterval<String>> getPlotTimeSpansOfRegion(String regionName) throws RemoteException;
ArrayList<TimestampInterval<String>> getPlotTimeSpansOfGeneralStation(String generalStationName) throws RemoteException;

//logger
LoggerType[] getLoggerTypes() throws RemoteException;
LoggerType getLoggerType(String loggerTypeName) throws RemoteException;

//source catalog
SourceEntry[] getSourceCatalogEntries() throws RemoteException;

//console
long execute_console_command(String input_line) throws RemoteException;
Pair<Boolean,String[]> console_comand_get_output(long commandThreadId) throws RemoteException;

//query
TimestampSeries plot(String queryType, String plotID, String[] columnNames, AggregationInterval aggregationInterval, DataQuality dataQuality, boolean interpolated, Long start, Long end) throws RemoteException;
TimestampSeries plotQuartile(String plotID, String[] columnNames, AggregationInterval aggregationInterval, DataQuality dataQuality, boolean interpolated, Long start, Long end) throws RemoteException;
TimestampSeries cache(String streamName, String[] columnNames, AggregationInterval aggregationInterval) throws RemoteException;

//time series mask
TimeSeriesMask getTimeSeriesMask(String stationName, String sensorName) throws RemoteException;
void setTimeSeriesMask(String stationName, String sensorName, TimeSeriesMask timeSeriesMask) throws RemoteException;
ArrayList<PlotStatus> getPlotStatuses() throws RemoteException;
ArrayList<PlotStatus> getPlotStatusesOfGeneralStation(String generalStationName) throws RemoteException;
ArrayList<PlotStatus> getPlotStatusesOfRegion(String regionName) throws RemoteException;
}
package tsdb.remote;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

import tsdb.component.LoggerType;
import tsdb.component.Region;
import tsdb.component.Sensor;
import tsdb.component.SourceEntry;
import tsdb.util.AggregationInterval;
import tsdb.util.DataQuality;
import tsdb.util.Pair;
import tsdb.util.TimeSeriesMask;
import tsdb.util.TimestampInterval;
import tsdb.util.iterator.TimestampSeries;

/**
* Remote interface of TsDB, callable locally or by RMI
* @author woellauer
*
*/
public interface RemoteTsDB extends Remote {

//sensor
/**
* plotID format:
* <br>
* for plot or virtual plot: PLOT_ID
* <br>
* for virtual plot of one station: PLOT_ID:STATION_ID
* <br>
* for one station: STATION_ID
*
*/
String[] getSensorNamesOfPlotWithVirtual(String plotID) throws RemoteException;
String[] getSensorNamesOfGeneralStationWithVirtual(String generalStationName) throws RemoteException;
Sensor[] getSensors() throws RemoteException;
Sensor getSensor(String sensorName) throws RemoteException;
String[] getBaseSchema(String[] rawSchema) throws RemoteException;
String[] getCacheSchemaNames(String streamName) throws RemoteException;
String[] getValidSchema(String plotID, String[] sensorNames) throws RemoteException;
String[] getValidSchemaWithVirtualSensors(String plotID, String[] sensorNames) throws RemoteException;
String[] supplementSchema(String[] schema, String[] availableSchema) throws RemoteException;

//region
Region[] getRegions() throws RemoteException;
Region getRegionByName(String name) throws RemoteException;
@Deprecated
String[] getRegionLongNames() throws RemoteException;
@Deprecated
Region getRegionByLongName(String longName) throws RemoteException;
Region getRegionByPlot(String plotID) throws RemoteException;

//general station
GeneralStationInfo[] getGeneralStations() throws RemoteException;
GeneralStationInfo[] getGeneralStationsOfRegion(String regionName) throws RemoteException;
@Deprecated
String[] getGeneralStationLongNames(String regionName) throws RemoteException;

//plot station virtualPlot
PlotInfo[] getPlots() throws RemoteException;
StationInfo[] getStations() throws RemoteException;
String getStationLoggerTypeName(String stationName) throws RemoteException;
String[] getPlotStations(String plotID) throws RemoteException;
VirtualPlotInfo[] getVirtualPlots() throws RemoteException;
VirtualPlotInfo getVirtualPlot(String plotID) throws RemoteException;
String[] getStationNames() throws RemoteException;
String[] cacheStorageGetStreamNames() throws RemoteException;
String[] getPlotIDsByGeneralStationByLongName(String longName) throws RemoteException;
ArrayList<TimestampInterval<String>> getPlotTimeSpans() throws RemoteException;
ArrayList<TimestampInterval<String>> getPlotTimeSpansOfRegion(String regionName) throws RemoteException;
ArrayList<TimestampInterval<String>> getPlotTimeSpansOfGeneralStation(String generalStationName) throws RemoteException;

//logger
LoggerType[] getLoggerTypes() throws RemoteException;
LoggerType getLoggerType(String loggerTypeName) throws RemoteException;

//source catalog
SourceEntry[] getSourceCatalogEntries() throws RemoteException;

//console
long execute_console_command(String input_line) throws RemoteException;
Pair<Boolean,String[]> console_comand_get_output(long commandThreadId) throws RemoteException;

//query
TimestampSeries plot(String queryType, String plotID, String[] columnNames, AggregationInterval aggregationInterval, DataQuality dataQuality, boolean interpolated, Long start, Long end) throws RemoteException;
TimestampSeries plotQuartile(String plotID, String[] columnNames, AggregationInterval aggregationInterval, DataQuality dataQuality, boolean interpolated, Long start, Long end) throws RemoteException;
TimestampSeries cache(String streamName, String[] columnNames, AggregationInterval aggregationInterval) throws RemoteException;

//time series mask
TimeSeriesMask getTimeSeriesMask(String stationName, String sensorName) throws RemoteException;
void setTimeSeriesMask(String stationName, String sensorName, TimeSeriesMask timeSeriesMask) throws RemoteException;
ArrayList<PlotStatus> getPlotStatuses() throws RemoteException;
ArrayList<PlotStatus> getPlotStatusesOfGeneralStation(String generalStationName) throws RemoteException;
ArrayList<PlotStatus> getPlotStatusesOfRegion(String regionName) throws RemoteException;

//info
String get_tubedb_version() throws RemoteException;
}
Loading

0 comments on commit 2282223

Please sign in to comment.