Class TzConf

java.lang.Object
org.bedework.util.jmx.ConfBase<TzConfigImpl>
org.bedework.timezones.service.TzConf
All Implemented Interfaces:
TzConfig, TzConfMBean, org.bedework.util.jmx.BaseMBean, org.bedework.util.jmx.ConfBaseMBean, org.bedework.util.jmx.ConfigHolder<TzConfigImpl>, org.bedework.util.logging.Logged

public class TzConf extends org.bedework.util.jmx.ConfBase<TzConfigImpl> implements TzConfMBean, org.bedework.util.jmx.ConfigHolder<TzConfigImpl>
Author:
douglm
  • Field Summary

    Fields inherited from class org.bedework.util.jmx.ConfBase

    cfg, statusDone, statusFailed, statusInterrupted, statusRunning, statusStopped, statusTimedout, statusUnknown
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Check with primary source
    compareData(String tzdataUrl)
    Compare data pointed to by tzdataUrl with the current data.
    Location of the db data.
     
    boolean
    Are we a primary server?
     
    long
     
     
    Get the current stats
     
     
    (Re)load the configuration
    void
    Save the configuration.
    Refresh all the data - almost a restart
    void
    Location of the db data.
    void
     
    void
    setPrimaryServer(boolean val)
    Are we a primary server?
    void
    Primary url
    void
    setRefreshDelay(long val)
    Refresh interval - seconds
    void
     
    void
    Tzdata url
    void
     
    updateData(String tzdataUrl)
    Update the data from the data at the given url

    Methods inherited from class org.bedework.util.jmx.ConfBase

    createObjectName, ensureDir, getConfig, getConfigDirectory, getConfigInfo, getConfigInfo, getConfigInfo, getConfigName, getLogger, getManagementContext, getPathSuffix, getRegisteredMBeans, getServiceName, getServiceObjectName, getStatus, getStore, isRunning, loadConfig, makeObject, register, register, saveConfig, setStatus, setStore, start, stop, unregister, unregister

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bedework.util.jmx.BaseMBean

    getServiceName, isRunning, start, stop

    Methods inherited from interface org.bedework.util.jmx.ConfBaseMBean

    getConfigName, getStatus, saveConfig, setStatus

    Methods inherited from interface org.bedework.util.jmx.ConfigHolder

    getConfig, getStore

    Methods inherited from interface org.bedework.util.logging.Logged

    audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
  • Constructor Details

    • TzConf

      public TzConf()
  • Method Details

    • setDtstamp

      public void setDtstamp(String val)
      Specified by:
      setDtstamp in interface TzConfig
      Parameters:
      val - the dtstamp
    • getDtstamp

      public String getDtstamp()
      Specified by:
      getDtstamp in interface TzConfig
      Returns:
      String XML format dtstamp
    • setVersion

      public void setVersion(String val)
      Specified by:
      setVersion in interface TzConfig
      Parameters:
      val - version
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface TzConfig
      Returns:
      String version
    • setTzdataUrl

      public void setTzdataUrl(String val)
      Description copied from interface: TzConfig
      Tzdata url
      Specified by:
      setTzdataUrl in interface TzConfig
      Parameters:
      val - Location of the primary data
    • getTzdataUrl

      public String getTzdataUrl()
      Specified by:
      getTzdataUrl in interface TzConfig
      Returns:
      String tzdata url
    • setDbPath

      public void setDbPath(String val)
      Description copied from interface: TzConfig
      Location of the db data.
      Specified by:
      setDbPath in interface TzConfig
      Parameters:
      val - String
    • getDbPath

      public String getDbPath()
      Description copied from interface: TzConfig
      Location of the db data.
      Specified by:
      getDbPath in interface TzConfig
      Returns:
      String, null for unset
    • setPrimaryUrl

      public void setPrimaryUrl(String val)
      Description copied from interface: TzConfig
      Primary url
      Specified by:
      setPrimaryUrl in interface TzConfig
      Parameters:
      val - The URL of a primary server, e.g. www.bedework.org
    • getPrimaryUrl

      public String getPrimaryUrl()
      Specified by:
      getPrimaryUrl in interface TzConfig
      Returns:
      String Primary url
    • setPrimaryServer

      public void setPrimaryServer(boolean val)
      Description copied from interface: TzConfig
      Are we a primary server?
      Specified by:
      setPrimaryServer in interface TzConfig
      Parameters:
      val - boolean
    • getPrimaryServer

      public boolean getPrimaryServer()
      Description copied from interface: TzConfig
      Are we a primary server?
      Specified by:
      getPrimaryServer in interface TzConfig
      Returns:
      boolean
    • setSource

      public void setSource(String val)
      Specified by:
      setSource in interface TzConfig
      Parameters:
      val - source of the data
    • getSource

      public String getSource()
      Specified by:
      getSource in interface TzConfig
      Returns:
      source of the data
    • setRefreshDelay

      public void setRefreshDelay(long val)
      Description copied from interface: TzConfig
      Refresh interval - seconds
      Specified by:
      setRefreshDelay in interface TzConfig
      Parameters:
      val - interval
    • getRefreshDelay

      public long getRefreshDelay()
      Specified by:
      getRefreshDelay in interface TzConfig
      Returns:
      long Refresh interval - seconds
    • getStats

      public List<Stat> getStats()
      Description copied from interface: TzConfMBean
      Get the current stats
      Specified by:
      getStats in interface TzConfMBean
      Returns:
      List of Stat
    • refreshData

      public String refreshData()
      Description copied from interface: TzConfMBean
      Refresh all the data - almost a restart
      Specified by:
      refreshData in interface TzConfMBean
      Returns:
      completion code.
    • checkData

      public String checkData()
      Description copied from interface: TzConfMBean
      Check with primary source
      Specified by:
      checkData in interface TzConfMBean
      Returns:
      completion code.
    • compareData

      public String compareData(String tzdataUrl)
      Description copied from interface: TzConfMBean
      Compare data pointed to by tzdataUrl with the current data.
      Specified by:
      compareData in interface TzConfMBean
      Parameters:
      tzdataUrl - to compare with
      Returns:
      completion code.
    • updateData

      public String updateData(String tzdataUrl)
      Description copied from interface: TzConfMBean
      Update the data from the data at the given url
      Specified by:
      updateData in interface TzConfMBean
      Parameters:
      tzdataUrl - reference to data
      Returns:
      completion code.
    • loadConfig

      public String loadConfig()
      Description copied from interface: TzConfMBean
      (Re)load the configuration
      Specified by:
      loadConfig in interface TzConfMBean
      Specified by:
      loadConfig in class org.bedework.util.jmx.ConfBase<TzConfigImpl>
      Returns:
      status
    • putConfig

      public void putConfig()
      Save the configuration.
      Specified by:
      putConfig in interface org.bedework.util.jmx.ConfigHolder<TzConfigImpl>