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


public interface IStatsDatabase<T extends com.wowza.wms.stats.entry.StatsEntry>
  • Field Details

  • Method Details

    • 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

      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 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 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
    • 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.