Class H2dbCachedData
java.lang.Object
org.bedework.timezones.common.AbstractCachedData
org.bedework.timezones.common.db.AbstractDb
org.bedework.timezones.common.h2db.H2dbCachedData
- All Implemented Interfaces:
Serializable,CachedData,org.bedework.util.logging.Logged
Cached timezone data in an h2 database.
- Author:
- douglm
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.timezones.common.db.AbstractDb
AbstractDb.DbIterator<T>, AbstractDb.TzEntry, AbstractDb.UpdateThreadNested classes/interfaces inherited from class org.bedework.timezones.common.AbstractCachedData
AbstractCachedData.AliasMaps -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConnectionCurrent Databaseprotected com.fasterxml.jackson.databind.ObjectMapperFields inherited from class org.bedework.timezones.common.db.AbstractDb
dbLock, openFields inherited from class org.bedework.timezones.common.AbstractCachedData
aliasMaps, cfg, dtstamp, expansions, msgPrefix -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTzAlias(TzAlias val) voidprotected byte[]=================================================================== Json methods ===================================================================protected voidclearDb()protected voidclose()protected AbstractDb.DbIterator<TzAlias>protected <T> TgetJson(InputStream is, Class<T> valueType) protected TzDbSpecgetTzAlias(String val) protected AbstractDb.DbIterator<TzDbSpec>protected voidopen()voidputTzAlias(TzAlias val) voidvoidremoveTzAlias(TzAlias val) Methods inherited from class org.bedework.timezones.common.db.AbstractDb
checkData, checkOpen, fail, findIds, findTzAliases, findTzs, getSource, getStats, initData, isOpen, loadInitialData, stop, updateDataMethods inherited from class org.bedework.timezones.common.AbstractCachedData
addAlias, escape, findAliases, findTimezones, fromAlias, getAliasedCachedVtz, getAliasedXTimeZone, getAliasesStr, getAllCachedVtzs, getCachedVtz, getDtstamp, getExpanded, getLogger, getNameList, getTimeZone, getTimezones, getTimezones, getXTimeZone, parseDef, processSpec, processSpec, resetTzs, setExpanded, vtzFromCalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Field Details
-
mapper
protected com.fasterxml.jackson.databind.ObjectMapper mapper -
conn
Current Database
-
-
Constructor Details
-
H2dbCachedData
Start from database cache. Fall back is probably to use the zipped data.- Parameters:
cfg- the configurationclear- remove all data from db first- Throws:
TzException- on fatal error
-
-
Method Details
-
addTzAlias
- Specified by:
addTzAliasin classAbstractDb- Parameters:
val- the alias- Throws:
TzException- on fatal error
-
putTzAlias
- Specified by:
putTzAliasin classAbstractDb- Parameters:
val- the alias- Throws:
TzException- on fatal error
-
removeTzAlias
- Specified by:
removeTzAliasin classAbstractDb- Parameters:
val- the alias- Throws:
TzException- on fatal error
-
getTzAlias
- Specified by:
getTzAliasin classAbstractDb- Parameters:
val- the alias- Returns:
- alias entry
- Throws:
TzException- on fatal error
-
getAliasIterator
- Specified by:
getAliasIteratorin classAbstractDb
-
getTzSpecIterator
- Specified by:
getTzSpecIteratorin classAbstractDb
-
addTzSpec
- Specified by:
addTzSpecin classAbstractDb- Parameters:
val- the spec- Throws:
TzException- on fatal error
-
putTzSpec
- Specified by:
putTzSpecin classAbstractDb- Parameters:
val- the spec- Throws:
TzException- on fatal error
-
getSpec
- Specified by:
getSpecin classAbstractDb- Throws:
TzException
-
open
- Specified by:
openin classAbstractDb- Throws:
TzException
-
close
protected void close()- Specified by:
closein classAbstractDb
-
clearDb
- Specified by:
clearDbin classAbstractDb- Throws:
TzException
-
bytesJson
=================================================================== Json methods ===================================================================- Throws:
TzException
-
getJson
- Throws:
TzException
-