Interface IStatsDatabase<T extends com.wowza.wms.stats.entry.StatsEntry>

  • public interface IStatsDatabase<T extends com.wowza.wms.stats.entry.StatsEntry>
    • Method Detail

      • setFilename

        void setFilename​(String filename)
        Sets the filename of the file on disk to be used
        filename -
      • getFilename

        String getFilename()
        Gets the filename of the file on disk to be used
        returns null if setFilename has not been called
      • create

        boolean create​(String filename,
                       int fieldCount)
        Creates an empty database for use
        filename - to be used.
        fieldCount - number of fields being stored
        returns false if unable to create the DB otherwise true
      • open

        boolean open()
        Opens the database for reading/writing
        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
        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 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.
        level -
        data -
        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
        level - to delete from
        datetime -
        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
        ref count for the database
      • setDebugLogging

        void setDebugLogging​(boolean enable)
        Enables/disables debug logging on within the database methods
        enable -
      • dumpDebug

        void dumpDebug()
        dumps debug data for the database.