use of com.sun.messaging.jmq.jmsserver.persist.api.TransactionInfo in project openmq by eclipse-ee4j.
the class TidList method getAllTransactionStates.
/**
* Retrieve all local and cluster transaction ids with their state in the store.
*
* @return A HashMap. The key is a TransactionUID. The value is a TransactionState.
* @exception IOException if an error occurs while getting the data
*/
HashMap getAllTransactionStates() throws IOException {
HashMap map = new HashMap(tidMap.size());
Iterator itr = tidMap.entrySet().iterator();
while (itr.hasNext()) {
Map.Entry entry = (Map.Entry) itr.next();
TransactionInfo txnInfo = (TransactionInfo) entry.getValue();
int type = txnInfo.getType();
if (type == TransactionInfo.TXN_LOCAL || type == TransactionInfo.TXN_CLUSTER) {
map.put(entry.getKey(), (new TransactionInfo(txnInfo)));
}
}
return map;
}
use of com.sun.messaging.jmq.jmsserver.persist.api.TransactionInfo in project openmq by eclipse-ee4j.
the class TidList method getAllRemoteTransactionStates.
/**
* Retrieve all remote transaction ids with their state in the store.
*
* @return A HashMap. The key is a TransactionUID. The value is a TransactionState.
* @exception IOException if an error occurs while getting the data
*/
HashMap getAllRemoteTransactionStates() throws IOException {
HashMap map = new HashMap(tidMap.size());
Iterator itr = tidMap.entrySet().iterator();
while (itr.hasNext()) {
Map.Entry entry = (Map.Entry) itr.next();
TransactionInfo txnInfo = (TransactionInfo) entry.getValue();
int type = txnInfo.getType();
if (type == TransactionInfo.TXN_REMOTE) {
map.put(entry.getKey(), (new TransactionState(txnInfo.getTransactionState())));
}
}
return map;
}
Aggregations