/** {@inheritDoc} */ @Override public long processInLongOutLong(int type, long val) throws IgniteCheckedException { switch (type) { case OP_PREPARE: ((TransactionProxyImpl)tx(val)).tx().prepare(true); return TRUE; case OP_COMMIT: tx(val).commit(); return txClose(val); case OP_ROLLBACK: tx(val).rollback(); return txClose(val); case OP_CLOSE: return txClose(val); case OP_SET_ROLLBACK_ONLY: return tx(val).setRollbackOnly() ? TRUE : FALSE; case OP_STATE: return tx(val).state().ordinal(); case OP_RESET_METRICS: txs.resetMetrics(); return TRUE; } return super.processInLongOutLong(type, val); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); for (int i = 0; i < gridCount(); i++) { Ignite g = grid(i); g.cache(DEFAULT_CACHE_NAME).removeAll(); assert g.cache(DEFAULT_CACHE_NAME).localSize() == 0; } for (int i = 0; i < gridCount(); i++) { Ignite g = grid(i); g.cache(DEFAULT_CACHE_NAME).localMxBean().clear(); g.transactions().resetMetrics(); } }
/** {@inheritDoc} */ @Override public long processInLongOutLong(int type, long val) throws IgniteCheckedException { switch (type) { case OP_PREPARE: ((TransactionProxyImpl)tx(val)).tx().prepare(true); return TRUE; case OP_COMMIT: tx(val).commit(); return txClose(val); case OP_ROLLBACK: tx(val).rollback(); return txClose(val); case OP_CLOSE: return txClose(val); case OP_SET_ROLLBACK_ONLY: return tx(val).setRollbackOnly() ? TRUE : FALSE; case OP_STATE: return tx(val).state().ordinal(); case OP_RESET_METRICS: txs.resetMetrics(); return TRUE; } return super.processInLongOutLong(type, val); }