DBManager.BaseConsumer
Modifier and Type | Field and Description |
---|---|
protected static String |
DATE_FORMAT |
protected static SimpleDateFormat |
format |
backupFolder, backupIntervalMS, connection, dbFileBaseFolder, dbFileName, dbName, password, poolManager, queriesFile, username
Constructor and Description |
---|
AccountingDBManager()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
connectToMySql() |
void |
open()
Load the HSQL Database Engine JDBC driver and open the connection to the db.
|
void |
run() |
void |
storeNodeAccoutingInfo(org.gcube.messaging.common.messages.records.IntervalRecord record,
org.gcube.messaging.common.messages.NodeAccountingMessage<org.gcube.messaging.common.messages.records.IntervalRecord> message)
Store Interval record on RI invocation
|
void |
storePortalMessage(org.gcube.messaging.common.messages.PortalAccountingMessage<?> message,
org.gcube.messaging.common.messages.records.BaseRecord record)
Store a generic portal message
|
backup, close, connectToEmbeddedDB, createDB, query, queryAndConsume, queryJSON, quote, reconnectToDB, toJSon, update, zipFolder
protected static final String DATE_FORMAT
protected static SimpleDateFormat format
protected void connectToMySql() throws Exception
connectToMySql
in class DBManager
Exception
public void open() throws ClassNotFoundException, SQLException, Exception
DBManager
open
in class DBManager
ClassNotFoundException
- if the HSQL Database Engine JDBC driver is not loadedSQLException
- if the connection to the db failsException
- if the tables creation failspublic void storeNodeAccoutingInfo(org.gcube.messaging.common.messages.records.IntervalRecord record, org.gcube.messaging.common.messages.NodeAccountingMessage<org.gcube.messaging.common.messages.records.IntervalRecord> message)
interval
- the intervalrecord
- the recordmessage
- the node Accounting messagepublic void storePortalMessage(org.gcube.messaging.common.messages.PortalAccountingMessage<?> message, org.gcube.messaging.common.messages.records.BaseRecord record)
message
- the messagerecord
- the base recordCopyright © 2014. All Rights Reserved.