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
Fields Modifier and Type Field Description static int
APPLICATION_FIELD_COUNT
static int
FIELD_ALL
static int
FIELD_ALL_CONN
static int
FIELD_BW_IN
static int
FIELD_BW_OUT
static int
FIELD_CPU
static int
FIELD_DASH_CONN
static int
FIELD_DISK
static int
FIELD_HDS_CONN
static int
FIELD_HEAP_MEMORY
static int
FIELD_HLS_CONN
static int
FIELD_INVALID
static int
FIELD_MEM
static int
FIELD_RTMP_CONN
static int
FIELD_RTSP_CONN
static int
FIELD_SMOOTH_CONN
static int
FIELD_WEBM_CONN
static int
FIELD_WEBRTC_CONN
static int
LEVEL_COUNT
static int
LEVEL_DAYS
static int
LEVEL_HOURS
static int
LEVEL_INVALID
static int
LEVEL_MINUTES
static int
LEVEL_SECONDS
static int
MACHINE_FIELD_COUNT
static int
SERVER_FIELD_COUNT
static int
TABLE_AVE
static int
TABLE_COUNT
static int
TABLE_INVALID
static int
TABLE_MAX
static int
TABLE_MIN
static int
TABLE_SECONDS
static int
VHOST_FIELD_COUNT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the database for reading and writingboolean
create(String filename, int fieldCount)
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
dumpDebug()
dumps debug data for the database.String
getFilename()
Gets the filename of the file on disk to be usedint
getRefCount()
Debug only.boolean
open()
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 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 Detail
-
LEVEL_INVALID
static final int LEVEL_INVALID
- See Also:
- Constant Field Values
-
LEVEL_SECONDS
static final int LEVEL_SECONDS
- See Also:
- Constant Field Values
-
LEVEL_MINUTES
static final int LEVEL_MINUTES
- See Also:
- Constant Field Values
-
LEVEL_HOURS
static final int LEVEL_HOURS
- See Also:
- Constant Field Values
-
LEVEL_DAYS
static final int LEVEL_DAYS
- See Also:
- Constant Field Values
-
LEVEL_COUNT
static final int LEVEL_COUNT
- See Also:
- Constant Field Values
-
TABLE_INVALID
static final int TABLE_INVALID
- See Also:
- Constant Field Values
-
TABLE_SECONDS
static final int TABLE_SECONDS
- See Also:
- Constant Field Values
-
TABLE_MIN
static final int TABLE_MIN
- See Also:
- Constant Field Values
-
TABLE_MAX
static final int TABLE_MAX
- See Also:
- Constant Field Values
-
TABLE_AVE
static final int TABLE_AVE
- See Also:
- Constant Field Values
-
TABLE_COUNT
static final int TABLE_COUNT
- See Also:
- Constant Field Values
-
FIELD_BW_IN
static final int FIELD_BW_IN
- See Also:
- Constant Field Values
-
FIELD_BW_OUT
static final int FIELD_BW_OUT
- See Also:
- Constant Field Values
-
FIELD_RTMP_CONN
static final int FIELD_RTMP_CONN
- See Also:
- Constant Field Values
-
FIELD_RTSP_CONN
static final int FIELD_RTSP_CONN
- See Also:
- Constant Field Values
-
FIELD_HDS_CONN
static final int FIELD_HDS_CONN
- See Also:
- Constant Field Values
-
FIELD_HLS_CONN
static final int FIELD_HLS_CONN
- See Also:
- Constant Field Values
-
FIELD_SMOOTH_CONN
static final int FIELD_SMOOTH_CONN
- See Also:
- Constant Field Values
-
FIELD_WEBRTC_CONN
static final int FIELD_WEBRTC_CONN
- See Also:
- Constant Field Values
-
FIELD_WEBM_CONN
static final int FIELD_WEBM_CONN
- See Also:
- Constant Field Values
-
FIELD_DASH_CONN
static final int FIELD_DASH_CONN
- See Also:
- Constant Field Values
-
APPLICATION_FIELD_COUNT
static final int APPLICATION_FIELD_COUNT
- See Also:
- Constant Field Values
-
FIELD_CPU
static final int FIELD_CPU
- See Also:
- Constant Field Values
-
FIELD_MEM
static final int FIELD_MEM
- See Also:
- Constant Field Values
-
FIELD_DISK
static final int FIELD_DISK
- See Also:
- Constant Field Values
-
MACHINE_FIELD_COUNT
static final int MACHINE_FIELD_COUNT
- See Also:
- Constant Field Values
-
FIELD_ALL_CONN
static final int FIELD_ALL_CONN
- See Also:
- Constant Field Values
-
FIELD_HEAP_MEMORY
static final int FIELD_HEAP_MEMORY
- See Also:
- Constant Field Values
-
SERVER_FIELD_COUNT
static final int SERVER_FIELD_COUNT
- See Also:
- Constant Field Values
-
VHOST_FIELD_COUNT
static final int VHOST_FIELD_COUNT
- See Also:
- Constant Field Values
-
FIELD_ALL
static final int FIELD_ALL
- See Also:
- Constant Field Values
-
FIELD_INVALID
static final int FIELD_INVALID
- See Also:
- Constant Field Values
-
-
Method Detail
-
setFilename
void setFilename(String filename)
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
boolean 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
-
open
boolean open()
Opens the database for reading/writing- Returns:
- returns false if unable to open the database otherwise true
-
read
java.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 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.
-
-