AccountingDBManager (consumer-service 1.9.0-2.17.2 API)
Date: 2014-01-30

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.messaging.common.consumer.db
Class AccountingDBManager

    java.lang.Object
      org.gcube.messaging.common.consumer.db.DBManager
          org.gcube.messaging.common.consumer.db.AccountingDBManager

All Implemented Interfaces:
  Runnable

    public class AccountingDBManager

extends DBManager
implements Runnable

Author:
  Andrea Manzi (CERN)

Nested Class Summary

Nested classes/interfaces inherited from class org.gcube.messaging.common.consumer.db.DBManager
`DBManager.BaseConsumer`

Field Summary
`protected static String` | `DATE_FORMAT`
`protected static SimpleDateFormat` | `format`

Fields inherited from class org.gcube.messaging.common.consumer.db.DBManager
`backupFolder, backupIntervalMS, connection, dbFileBaseFolder, dbFileName, dbName, password, poolManager, queriesFile, username`

Constructor Summary
`AccountingDBManager()` Default constructor

Method Summary
`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

Methods inherited from class org.gcube.messaging.common.consumer.db.DBManager
`backup, close, connectToEmbeddedDB, createDB, query, queryAndConsume, queryJSON, quote, reconnectToDB, toJSon, update, zipFolder`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DATE_FORMAT

    protected static final String DATE_FORMAT

See Also:
  Constant Field Values

### format

    protected static SimpleDateFormat format

Constructor Detail

### AccountingDBManager

    public AccountingDBManager()

  Default constructor

Method Detail

### connectToMySql

    protected void connectToMySql()
                           throws Exception

  Specified by:
    `connectToMySql` in class `DBManager`
  Throws:
    `Exception`

### open

    public void open()
              throws ClassNotFoundException,
                     SQLException,
                     Exception

  Description copied from class: `DBManager`
  Load the HSQL Database Engine JDBC driver and open the connection to the db.

  Specified by:
    `open` in class `DBManager`
  Throws:
    `ClassNotFoundException` - if the HSQL Database Engine JDBC driver is not loaded
    `SQLException` - if the connection to the db fails
    `Exception` - if the tables creation fails

### storeNodeAccoutingInfo

    public 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

  Parameters:
    `interval` - the interval
    `record` - the record
    `message` - the node Accounting message

### storePortalMessage

    public void storePortalMessage(org.gcube.messaging.common.messages.PortalAccountingMessage<?> message,
                                   org.gcube.messaging.common.messages.records.BaseRecord record)

  Store a generic portal message

  Parameters:
    `message` - the message
    `record` - the base record

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.