/** * Create a new transaction. If there is already a transaction associated * with the thread then this new transaction will be automatically nested. * The transaction is *not* running at this point. * * No timeout is associated with this transaction, i.e., it will not be * automatically rolled back by the system. */ public Transaction () { _theTransaction = new AtomicAction(); }
/** * AtomicAction constructor with a Uid. This constructor is for recreating * an AtomicAction, typically during crash recovery. */ public Transaction (Uid objUid) { _theTransaction = new AtomicAction(objUid); }
static public int value () { AtomicAction A = new AtomicAction(); int result = -1; A.begin(); transactionalObject.increment(); result = transactionalObject.value(); A.commit(); return result; }
public STMVerticle () { transactionalObject = theContainer.create(new SampleLockable(10)); System.out.println("Object name: "+theContainer.getIdentifier(transactionalObject)); AtomicAction A = new AtomicAction(); /* * Flush state to disk (for this example). */ A.begin(); transactionalObject.increment(); A.commit(); }
AtomicAction action = new AtomicAction();
act = new AtomicAction();
AtomicAction A = new AtomicAction(); boolean shouldCommit = true; AtomicAction B = new AtomicAction(); int value = -1; boolean doCommit = true;
String uidName = map.get(ClientVerticle.LEADER); Sample obj1 = theContainer.clone(new SampleLockable(10), new Uid(uidName)); AtomicAction A = new AtomicAction(); int value = -1; int initialValue = -1;
String uidName = map.get(ClientVerticle.LEADER); Sample obj1 = theContainer.clone(new SampleLockable(10), new Uid(uidName)); AtomicAction A = new AtomicAction(); int value = -1; int initialValue = -1;
@BeforeClass public static void beforeClass() { if (System.getProperty("com.arjuna.ats.arjuna.common.propertiesFile") == null) { System.setProperty("com.arjuna.ats.arjuna.common.propertiesFile", "jbossts-properties.xml"); } jtaPropertyManager.getJTAEnvironmentBean().setXaResourceRecordWrappingPluginClassName( "com.hp.mwtests.ts.jta.recovery.TestXAResourceRecordWrappingPlugin" ); jtaPropertyManager.getJTAEnvironmentBean().setXaResourceRecoveryClassNames(Arrays.asList( "com.hp.mwtests.ts.jta.recovery.TestXAResourceRecovery" )); recoveryPropertyManager.getRecoveryEnvironmentBean().setRecoveryBackoffPeriod(1); recoveryPropertyManager.getRecoveryEnvironmentBean().setRecoveryModuleClassNames(Arrays.asList( "com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule", "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule")); ATOMIC_ACTION_TYPE = new AtomicAction().type(); }
public RecoveryXAResource () { if (xids == null) { xids = new Xid[2]; AtomicAction a = new AtomicAction(); xids[0] = new XidImple(a); String c = com.arjuna.ats.arjuna.coordinator.TxControl.getXANodeName(); String b = "2"; com.arjuna.ats.arjuna.coordinator.TxControl.setXANodeName(b); xids[1] = new XidImple(new Uid()); com.arjuna.ats.arjuna.coordinator.TxControl.setXANodeName(c); } }
StoreManager.getRecoveryStore().allObjUids(new AtomicAction().type(), uids); Uid uid = UidHelper.unpackFrom(uids); assertTrue(uid.equals(get_uid)); StoreManager.getRecoveryStore().allObjUids(new AtomicAction().type(), uids); uid = UidHelper.unpackFrom(uids); assertTrue(uid.equals(Uid.nullUid()));
@Test public void testAtomicAction () throws Exception { SubordinateAtomicAction saa = new SubordinateAtomicAction(); AtomicAction A = new AtomicAction(); assertEquals(saa.commit(), ActionStatus.INVALID); assertEquals(saa.abort(), ActionStatus.INVALID); assertTrue(saa.type() != A.type()); assertTrue(saa.activated()); saa.doForget(); }
StoreManager.getRecoveryStore().allObjUids(new AtomicAction().type(), uids); Uid uid = UidHelper.unpackFrom(uids); assertTrue(uid.equals(get_uid)); manager.scan(); StoreManager.getRecoveryStore().allObjUids(new AtomicAction().type(), uids); uid = UidHelper.unpackFrom(uids); assertTrue(uid.equals(Uid.nullUid()));
String type = new AtomicAction().type(); StoreManager.getRecoveryStore().allObjUids(type, uids); boolean moreUids = true;
AtomicAction A = new AtomicAction();