private synchronized void _release() throws IOException { // Change the transaction state. setPhase(FREE); // wake-up an eventually user's thread in begin notify(); }
private synchronized void _release() throws IOException { // Change the transaction state. setPhase(FREE); // wake-up an eventually user's thread in begin notify(); }
public final synchronized void _stop() { synchronized (lock) { while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(FINALIZE); isRunning = false; garbage = true; // Wake-up the garbage thread. lock.notify(); } }
public final synchronized void _stop() { synchronized (lock) { while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(FINALIZE); isRunning = false; garbage = true; // Wake-up the garbage thread. lock.notify(); } }
public final synchronized void release() throws IOException { if ((phase != RUN) && (phase != COMMIT) && (phase != ROLLBACK)) throw new IllegalStateException("Can not release transaction."); if (((commitCount > CLEANUP_THRESHOLD_COMMIT) || (operationCount > CLEANUP_THRESHOLD_OPERATION) || (cumulativeSize > CLEANUP_THRESHOLD_SIZE)) && !garbage) { synchronized (lock) { // wake-up the garbage thread garbage = true; // Change the transaction state. setPhase(GARBAGE); // wake-up an eventually user's thread in begin lock.notify(); } } else { // Change the transaction state. setPhase(FREE); // wake-up an eventually user's thread in begin notify(); } }
public final synchronized void release() throws IOException { if ((phase != RUN) && (phase != COMMIT) && (phase != ROLLBACK)) throw new IllegalStateException("Can not release transaction."); if (((commitCount > CLEANUP_THRESHOLD_COMMIT) || (operationCount > CLEANUP_THRESHOLD_OPERATION) || (cumulativeSize > CLEANUP_THRESHOLD_SIZE)) && !garbage) { synchronized (lock) { // wake-up the garbage thread garbage = true; // Change the transaction state. setPhase(GARBAGE); // wake-up an eventually user's thread in begin lock.notify(); } } else { // Change the transaction state. setPhase(FREE); // wake-up an eventually user's thread in begin notify(); } }
public final synchronized void rollback() { if (phase != RUN) throw new IllegalStateException("Can not rollback."); if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "ATransaction, rollback"); setPhase(ROLLBACK); perThreadContext.get().getLog().clear(); }
public final synchronized void rollback() { if (phase != RUN) throw new IllegalStateException("Can not rollback."); if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "ATransaction, rollback"); setPhase(ROLLBACK); ((Context) perThreadContext.get()).getLog().clear(); }
logmon.log(BasicLevel.DEBUG, "ATransaction, committed"); setPhase(COMMIT);
logmon.log(BasicLevel.DEBUG, "ATransaction, committed"); setPhase(COMMIT);