com.cloudtran.api
Interface ITxBufferManagerAdmin


public interface ITxBufferManagerAdmin


Method Summary
 TxSummary getTransactionSummary()
          statistical information about the transactions.
 void killTxb()
          Shuts down the Transaction Buffer.
 boolean loadAllData()
          This is used by the CloudTran startup manager.
 boolean loadAllData(boolean alwaysLoad)
          This is an indication from the client or other manager to load all data from datasources into the grid.
 void resetTransactionSummary()
          Clear the statistical information about the transactions, as if for a new run.
 

Method Detail

loadAllData

boolean loadAllData()
This is used by the CloudTran startup manager. Do not use it in normal programming - use the following method (with the boolean parameter) instead.


loadAllData

boolean loadAllData(boolean alwaysLoad)
This is an indication from the client or other manager to load all data from datasources into the grid.

In production this method would probably not be called. (It could theoretically be used to do a delayed load of the grid, but this is not a normal use-case.)

For testing, it can be called many times for a given run of the txBufferManager.

If the alwaysLoad parameter is false, then the data is only loaded if the grid is not yet 'open for business'. This would be used for a single delayed-load.

For testing, the alwaysLoad parameter should be set true. This is equivalent to a grid reset - the data is always loaded.

This method does not take take into account the setting of the "ct.persist.loadAtStartOfDay" property - that is the responsibility of the caller.

Management programs that want to reload the grid under operator control should call loadAllData(true) - unconditionally reloading the data.

Returns:
true if the data is in fact loaded - i.e. this is the first call. Else false.

getTransactionSummary

TxSummary getTransactionSummary()
statistical information about the transactions. For details see TxSummary

Returns:
the stats as of this point in time. These will normally change from call to call.

resetTransactionSummary

void resetTransactionSummary()
Clear the statistical information about the transactions, as if for a new run. For details see TxSummary.

Use this with care!. If multiple clients call this at different points, it is difficult to entangle the different starting points after a reset. So if you want to compare stats at certain points from multiple clients, take a starting TxSummary, then get the ending TxSummary, and compare the difference.


killTxb

void killTxb()
Shuts down the Transaction Buffer.