Package com.wowza.wms.stats.database
Interface IStatsDatabase<T extends com.wowza.wms.stats.entry.StatsEntry>
- 
 public interface IStatsDatabase<T extends com.wowza.wms.stats.entry.StatsEntry>
- 
- 
Field SummaryFields Modifier and Type Field Description static intAPPLICATION_FIELD_COUNTstatic intFIELD_ALLstatic intFIELD_ALL_CONNstatic intFIELD_BW_INstatic intFIELD_BW_OUTstatic intFIELD_CPUstatic intFIELD_DASH_CONNstatic intFIELD_DISKstatic intFIELD_HDS_CONNstatic intFIELD_HEAP_MEMORYstatic intFIELD_HLS_CONNstatic intFIELD_INVALIDstatic intFIELD_MEMstatic intFIELD_RTMP_CONNstatic intFIELD_RTSP_CONNstatic intFIELD_SMOOTH_CONNstatic intFIELD_WEBM_CONNstatic intFIELD_WEBRTC_CONNstatic intLEVEL_COUNTstatic intLEVEL_DAYSstatic intLEVEL_HOURSstatic intLEVEL_INVALIDstatic intLEVEL_MINUTESstatic intLEVEL_SECONDSstatic intMACHINE_FIELD_COUNTstatic intSERVER_FIELD_COUNTstatic intTABLE_AVEstatic intTABLE_COUNTstatic intTABLE_INVALIDstatic intTABLE_MAXstatic intTABLE_MINstatic intTABLE_SECONDSstatic intVHOST_FIELD_COUNT
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the database for reading and writingbooleancreate(String filename, int fieldCount)Creates an empty database for usebooleandelete(int level, org.joda.time.DateTime datetime)Deletes all entries in the level from the date time provided (inclusive) to the end of the tablevoiddumpDebug()dumps debug data for the database.StringgetFilename()Gets the filename of the file on disk to be usedintgetRefCount()Debug only.booleanopen()Opens the database for reading/writingjava.util.List<T>read(int level, int table, org.joda.time.DateTime start, org.joda.time.DateTime end)Reads the Stats Entries from the databasevoidsetDebugLogging(boolean enable)Enables/disables debug logging on within the database methodsvoidsetFilename(String filename)Sets the filename of the file on disk to be usedbooleanwrite(int level, com.wowza.wms.stats.entry.StatsEntry[] data)Writes the provided stats entries to the database.
 
- 
- 
- 
Field Detail- 
LEVEL_INVALIDstatic final int LEVEL_INVALID - See Also:
- Constant Field Values
 
 - 
LEVEL_SECONDSstatic final int LEVEL_SECONDS - See Also:
- Constant Field Values
 
 - 
LEVEL_MINUTESstatic final int LEVEL_MINUTES - See Also:
- Constant Field Values
 
 - 
LEVEL_HOURSstatic final int LEVEL_HOURS - See Also:
- Constant Field Values
 
 - 
LEVEL_DAYSstatic final int LEVEL_DAYS - See Also:
- Constant Field Values
 
 - 
LEVEL_COUNTstatic final int LEVEL_COUNT - See Also:
- Constant Field Values
 
 - 
TABLE_INVALIDstatic final int TABLE_INVALID - See Also:
- Constant Field Values
 
 - 
TABLE_SECONDSstatic final int TABLE_SECONDS - See Also:
- Constant Field Values
 
 - 
TABLE_MINstatic final int TABLE_MIN - See Also:
- Constant Field Values
 
 - 
TABLE_MAXstatic final int TABLE_MAX - See Also:
- Constant Field Values
 
 - 
TABLE_AVEstatic final int TABLE_AVE - See Also:
- Constant Field Values
 
 - 
TABLE_COUNTstatic final int TABLE_COUNT - See Also:
- Constant Field Values
 
 - 
FIELD_BW_INstatic final int FIELD_BW_IN - See Also:
- Constant Field Values
 
 - 
FIELD_BW_OUTstatic final int FIELD_BW_OUT - See Also:
- Constant Field Values
 
 - 
FIELD_RTMP_CONNstatic final int FIELD_RTMP_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_RTSP_CONNstatic final int FIELD_RTSP_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_HDS_CONNstatic final int FIELD_HDS_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_HLS_CONNstatic final int FIELD_HLS_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_SMOOTH_CONNstatic final int FIELD_SMOOTH_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_WEBRTC_CONNstatic final int FIELD_WEBRTC_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_WEBM_CONNstatic final int FIELD_WEBM_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_DASH_CONNstatic final int FIELD_DASH_CONN - See Also:
- Constant Field Values
 
 - 
APPLICATION_FIELD_COUNTstatic final int APPLICATION_FIELD_COUNT - See Also:
- Constant Field Values
 
 - 
FIELD_CPUstatic final int FIELD_CPU - See Also:
- Constant Field Values
 
 - 
FIELD_MEMstatic final int FIELD_MEM - See Also:
- Constant Field Values
 
 - 
FIELD_DISKstatic final int FIELD_DISK - See Also:
- Constant Field Values
 
 - 
MACHINE_FIELD_COUNTstatic final int MACHINE_FIELD_COUNT - See Also:
- Constant Field Values
 
 - 
FIELD_ALL_CONNstatic final int FIELD_ALL_CONN - See Also:
- Constant Field Values
 
 - 
FIELD_HEAP_MEMORYstatic final int FIELD_HEAP_MEMORY - See Also:
- Constant Field Values
 
 - 
SERVER_FIELD_COUNTstatic final int SERVER_FIELD_COUNT - See Also:
- Constant Field Values
 
 - 
VHOST_FIELD_COUNTstatic final int VHOST_FIELD_COUNT - See Also:
- Constant Field Values
 
 - 
FIELD_ALLstatic final int FIELD_ALL - See Also:
- Constant Field Values
 
 - 
FIELD_INVALIDstatic final int FIELD_INVALID - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setFilenamevoid setFilename(String filename) Sets the filename of the file on disk to be used- Parameters:
- filename-
 
 - 
getFilenameString getFilename() Gets the filename of the file on disk to be used- Returns:
- returns null if setFilename has not been called
 
 - 
createboolean create(String filename, int fieldCount)Creates an empty database for use- Parameters:
- filename- to be used.
- fieldCount- number of fields being stored
- Returns:
- returns false if unable to create the DB otherwise true
 
 - 
openboolean open() Opens the database for reading/writing- Returns:
- returns false if unable to open the database otherwise true
 
 - 
readjava.util.List<T> read(int level, int table, org.joda.time.DateTime start, org.joda.time.DateTime end) Reads the Stats Entries from the database- Parameters:
- level- to read from
- table- to read from
- start- start date and time (inclusive) to start reading from
- end- end date and time (inclusive) to stop reading from. Okay if null, reads to end of table then.
- Returns:
- returns a Listof the stats entries (appropriate class) from the database 
 
 - 
writeboolean write(int level, com.wowza.wms.stats.entry.StatsEntry[] data)Writes the provided stats entries to the database. The first entry is written to the first table of the level, the second to the second table of the level etc. Must provide an entry for all tables in the level.- Parameters:
- level-
- data-
- Returns:
- returns false if unable to write or incorrect number of entries for the level
 
 - 
deleteboolean delete(int level, org.joda.time.DateTime datetime)Deletes all entries in the level from the date time provided (inclusive) to the end of the table- Parameters:
- level- to delete from
- datetime-
- Returns:
- returns false if unable to delete the requested entries, true otherwise. Doesn't not return false if there are no entries that meet the criteria
 
 - 
closevoid close() Closes the database for reading and writing
 - 
getRefCountint getRefCount() Debug only. Gets the current refcount for the database- Returns:
- ref count for the database
 
 - 
setDebugLoggingvoid setDebugLogging(boolean enable) Enables/disables debug logging on within the database methods- Parameters:
- enable-
 
 - 
dumpDebugvoid dumpDebug() dumps debug data for the database.
 
- 
 
-