Class LastByTableFactory
java.lang.Object
com.illumon.iris.db.tables.databases.LastByTableFactory
Creates a last by table based on our XML last by configuration file.
The OnDiskQueryDatabase will create a LastByTableFactory, which loads the XML; and then call the getTable method
to actually instantiate a table.
The readXmlConfig is also used by the LastByIntradayLoggerFactory so that we can generate appropriate loggers
for the last by tables, hooking into the DatabaseTools and IntradayLoggerFactory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new last by table.static Map<String,
Map<String, com.illumon.iris.db.tables.databases.LastByTableFactory.LastByFactoryType>> readXmlConfig
(com.fishlib.io.logger.Logger logger, String configName) Reads the XML configuration; optionally populating the xmlToFactoryMap and loggerInterfaceToFactoryMap
-
Constructor Details
-
LastByTableFactory
public LastByTableFactory(com.fishlib.io.logger.Logger logger)
-
-
Method Details
-
getTable
public Table getTable(Database database, String namespace, String tableName, com.fishlib.io.logger.Logger log) Create a new last by table. If the table does not exist, or can not be constructed an exception is thrown.- Parameters:
database
- the database creating the tablenamespace
- the namespace of the requested tabletableName
- the name of the requested tablelog
- the logger which the table should use- Returns:
- a new last by table
-
readXmlConfig
public static Map<String,Map<String, readXmlConfigcom.illumon.iris.db.tables.databases.LastByTableFactory.LastByFactoryType>> (com.fishlib.io.logger.Logger logger, String configName) Reads the XML configuration; optionally populating the xmlToFactoryMap and loggerInterfaceToFactoryMap- Parameters:
logger
-configName
- name of configuration to load (XML file in classpath)- Returns:
- a map of Namespace, Table -> LastByFactoryTypes for instantiating new tables
-