Package org.bedework.timezones.service
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 -
Method Summary
Modifier and TypeMethodDescriptionCheck with primary sourcecompareData(String tzdataUrl) Compare data pointed to by tzdataUrl with the current data.Location of the db data.booleanAre we a primary server?longgetStats()Get the current stats(Re)load the configurationvoidSave the configuration.Refresh all the data - almost a restartvoidLocation of the db data.voidsetDtstamp(String val) voidsetPrimaryServer(boolean val) Are we a primary server?voidsetPrimaryUrl(String val) Primary urlvoidsetRefreshDelay(long val) Refresh interval - secondsvoidvoidsetTzdataUrl(String val) Tzdata urlvoidsetVersion(String val) updateData(String tzdataUrl) Update the data from the data at the given urlMethods 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, unregisterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.util.jmx.BaseMBean
getServiceName, isRunning, start, stopMethods inherited from interface org.bedework.util.jmx.ConfBaseMBean
getConfigName, getStatus, saveConfig, setStatusMethods inherited from interface org.bedework.util.jmx.ConfigHolder
getConfig, getStoreMethods 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
- Specified by:
setDtstampin interfaceTzConfig- Parameters:
val- the dtstamp
-
getDtstamp
- Specified by:
getDtstampin interfaceTzConfig- Returns:
- String XML format dtstamp
-
setVersion
- Specified by:
setVersionin interfaceTzConfig- Parameters:
val- version
-
getVersion
- Specified by:
getVersionin interfaceTzConfig- Returns:
- String version
-
setTzdataUrl
Description copied from interface:TzConfigTzdata url- Specified by:
setTzdataUrlin interfaceTzConfig- Parameters:
val- Location of the primary data
-
getTzdataUrl
- Specified by:
getTzdataUrlin interfaceTzConfig- Returns:
- String tzdata url
-
setDbPath
Description copied from interface:TzConfigLocation of the db data. -
getDbPath
Description copied from interface:TzConfigLocation of the db data. -
setPrimaryUrl
Description copied from interface:TzConfigPrimary url- Specified by:
setPrimaryUrlin interfaceTzConfig- Parameters:
val- The URL of a primary server, e.g. www.bedework.org
-
getPrimaryUrl
- Specified by:
getPrimaryUrlin interfaceTzConfig- Returns:
- String Primary url
-
setPrimaryServer
public void setPrimaryServer(boolean val) Description copied from interface:TzConfigAre we a primary server?- Specified by:
setPrimaryServerin interfaceTzConfig- Parameters:
val- boolean
-
getPrimaryServer
public boolean getPrimaryServer()Description copied from interface:TzConfigAre we a primary server?- Specified by:
getPrimaryServerin interfaceTzConfig- Returns:
- boolean
-
setSource
-
getSource
-
setRefreshDelay
public void setRefreshDelay(long val) Description copied from interface:TzConfigRefresh interval - seconds- Specified by:
setRefreshDelayin interfaceTzConfig- Parameters:
val- interval
-
getRefreshDelay
public long getRefreshDelay()- Specified by:
getRefreshDelayin interfaceTzConfig- Returns:
- long Refresh interval - seconds
-
getStats
Description copied from interface:TzConfMBeanGet the current stats- Specified by:
getStatsin interfaceTzConfMBean- Returns:
- List of Stat
-
refreshData
Description copied from interface:TzConfMBeanRefresh all the data - almost a restart- Specified by:
refreshDatain interfaceTzConfMBean- Returns:
- completion code.
-
checkData
Description copied from interface:TzConfMBeanCheck with primary source- Specified by:
checkDatain interfaceTzConfMBean- Returns:
- completion code.
-
compareData
Description copied from interface:TzConfMBeanCompare data pointed to by tzdataUrl with the current data.- Specified by:
compareDatain interfaceTzConfMBean- Parameters:
tzdataUrl- to compare with- Returns:
- completion code.
-
updateData
Description copied from interface:TzConfMBeanUpdate the data from the data at the given url- Specified by:
updateDatain interfaceTzConfMBean- Parameters:
tzdataUrl- reference to data- Returns:
- completion code.
-
loadConfig
Description copied from interface:TzConfMBean(Re)load the configuration- Specified by:
loadConfigin interfaceTzConfMBean- Specified by:
loadConfigin classorg.bedework.util.jmx.ConfBase<TzConfigImpl>- Returns:
- status
-
putConfig
public void putConfig()Save the configuration.- Specified by:
putConfigin interfaceorg.bedework.util.jmx.ConfigHolder<TzConfigImpl>
-