public synchronized final void stop() { while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(FREE); }
public void init(String path) throws IOException { phase = INIT; startTime = System.currentTimeMillis(); /* The Transaction subsystem is ready */ setPhase(FREE); }
public final synchronized void begin() throws IOException { while (phase != FREE) { try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(RUN); }
public final synchronized void begin() throws IOException { while (phase != FREE) { try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(RUN); }
public synchronized final void close() { if (phase == INIT) return; while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(INIT); }
public void init(String path) throws IOException { phase = INIT; startTime = System.currentTimeMillis(); /* The Transaction subsystem is ready */ setPhase(FREE); }
public synchronized final void stop() { while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(FREE); }
public synchronized void release() throws IOException { if ((phase != RUN) && (phase != COMMIT) && (phase != ROLLBACK)) throw new IllegalStateException("Can not release transaction."); // Change the transaction state. setPhase(FREE); // wake-up an eventually user's thread in begin notify(); }
public synchronized final void close() { if (phase == INIT) return; while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } // Change the transaction state. setPhase(INIT); } }
public synchronized void release() throws IOException { if ((phase != RUN) && (phase != COMMIT) && (phase != ROLLBACK)) throw new IllegalStateException("Can not release transaction."); // Change the transaction state. setPhase(FREE); // wake-up an eventually user's thread in begin notify(); }