Search in sources :

Example 6 with ObjectStoreIterator

use of com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator in project narayana by jbosstm.

the class ObjStoreBrowserImpl method supportedLog.

private final boolean supportedLog(String logID) throws ObjectStoreException, IOException {
    Uid id = new Uid(logID);
    if (id.equals(Uid.nullUid())) {
        System.err.println(logID + " is null Uid");
    } else if (currentType == null) {
        printStream.printf("No type selected%n");
    } else if (!currentType.contains("AtomicAction")) {
        printStream.printf("Can not support this type");
    } else {
        ObjectStoreIterator iter = new ObjectStoreIterator(StoreManager.getRecoveryStore(), "/" + currentType);
        Uid u;
        do {
            u = iter.iterate();
            if (u.equals(id))
                return true;
        } while (Uid.nullUid().notEquals(u));
    }
    return false;
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) ObjectStoreIterator(com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator)

Aggregations

Uid (com.arjuna.ats.arjuna.common.Uid)6 ObjectStoreIterator (com.arjuna.ats.arjuna.objectstore.ObjectStoreIterator)6 OutputObjectState (com.arjuna.ats.arjuna.state.OutputObjectState)2 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 ObjectStoreException (com.arjuna.ats.arjuna.exceptions.ObjectStoreException)1 SubordinateTransaction (com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinateTransaction)1 TransactionImporter (com.arjuna.ats.internal.jta.transaction.arjunacore.jca.TransactionImporter)1 XATerminatorImple (com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple)1 TestXAResource (com.hp.mwtests.ts.jta.jts.TestXAResource)1 IOException (java.io.IOException)1 MBeanException (javax.management.MBeanException)1 XAException (javax.transaction.xa.XAException)1 Xid (javax.transaction.xa.Xid)1