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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the database for reading and writingboolean
Creates an empty database for useboolean
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 tablevoid
dumps debug data for the database.Gets the filename of the file on disk to be usedint
Debug only.boolean
open()
Opens the database for reading/writingread
(int level, int table, org.joda.time.DateTime start, org.joda.time.DateTime end) Reads the Stats Entries from the databasevoid
setDebugLogging
(boolean enable) Enables/disables debug logging on within the database methodsvoid
setFilename
(String filename) Sets the filename of the file on disk to be usedboolean
write
(int level, com.wowza.wms.stats.entry.StatsEntry[] data) Writes the provided stats entries to the database.
-
Field Details
-
LEVEL_INVALID
static final int LEVEL_INVALID- See Also:
-
LEVEL_SECONDS
static final int LEVEL_SECONDS- See Also:
-
LEVEL_MINUTES
static final int LEVEL_MINUTES- See Also:
-
LEVEL_HOURS
static final int LEVEL_HOURS- See Also:
-
LEVEL_DAYS
static final int LEVEL_DAYS- See Also:
-
LEVEL_COUNT
static final int LEVEL_COUNT- See Also:
-
TABLE_INVALID
static final int TABLE_INVALID- See Also:
-
TABLE_SECONDS
static final int TABLE_SECONDS- See Also:
-
TABLE_MIN
static final int TABLE_MIN- See Also:
-
TABLE_MAX
static final int TABLE_MAX- See Also:
-
TABLE_AVE
static final int TABLE_AVE- See Also:
-
TABLE_COUNT
static final int TABLE_COUNT- See Also:
-
FIELD_BW_IN
static final int FIELD_BW_IN- See Also:
-
FIELD_BW_OUT
static final int FIELD_BW_OUT- See Also:
-
FIELD_RTMP_CONN
static final int FIELD_RTMP_CONN- See Also:
-
FIELD_RTSP_CONN
static final int FIELD_RTSP_CONN- See Also:
-
FIELD_HDS_CONN
static final int FIELD_HDS_CONN- See Also:
-
FIELD_HLS_CONN
static final int FIELD_HLS_CONN- See Also:
-
FIELD_SMOOTH_CONN
static final int FIELD_SMOOTH_CONN- See Also:
-
FIELD_WEBRTC_CONN
static final int FIELD_WEBRTC_CONN- See Also:
-
FIELD_WEBM_CONN
static final int FIELD_WEBM_CONN- See Also:
-
FIELD_DASH_CONN
static final int FIELD_DASH_CONN- See Also:
-
APPLICATION_FIELD_COUNT
static final int APPLICATION_FIELD_COUNT- See Also:
-
FIELD_CPU
static final int FIELD_CPU- See Also:
-
FIELD_MEM
static final int FIELD_MEM- See Also:
-
FIELD_DISK
static final int FIELD_DISK- See Also:
-
MACHINE_FIELD_COUNT
static final int MACHINE_FIELD_COUNT- See Also:
-
FIELD_ALL_CONN
static final int FIELD_ALL_CONN- See Also:
-
FIELD_HEAP_MEMORY
static final int FIELD_HEAP_MEMORY- See Also:
-
SERVER_FIELD_COUNT
static final int SERVER_FIELD_COUNT- See Also:
-
VHOST_FIELD_COUNT
static final int VHOST_FIELD_COUNT- See Also:
-
FIELD_ALL
static final int FIELD_ALL- See Also:
-
FIELD_INVALID
static final int FIELD_INVALID- See Also:
-
-
Method Details
-
setFilename
Sets the filename of the file on disk to be used- Parameters:
filename
-
-
getFilename
String getFilename()Gets the filename of the file on disk to be used- Returns:
- returns null if setFilename has not been called
-
create
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
-
open
boolean open()Opens the database for reading/writing- Returns:
- returns false if unable to open the database otherwise true
-
read
Reads the Stats Entries from the database- Parameters:
level
- to read fromtable
- to read fromstart
- start date and time (inclusive) to start reading fromend
- end date and time (inclusive) to stop reading from. Okay if null, reads to end of table then.- Returns:
- returns a List
of the stats entries (appropriate class) from the database
-
write
boolean 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
-
delete
boolean 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 fromdatetime
-- 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
-
close
void close()Closes the database for reading and writing -
getRefCount
int getRefCount()Debug only. Gets the current refcount for the database- Returns:
- ref count for the database
-
setDebugLogging
void setDebugLogging(boolean enable) Enables/disables debug logging on within the database methods- Parameters:
enable
-
-
dumpDebug
void dumpDebug()dumps debug data for the database.
-