/** * @see org.apache.activeio.journal.Journal#close() */ public void close() throws IOException { try { logger.close(); } catch (IOException e) { throw e; } catch (InterruptedException e) { throw (InterruptedIOException) new InterruptedIOException() .initCause(e); } catch (Exception e) { throw (IOException) new IOException("Journal close failed: " + e) .initCause(e); } }
public void close() throws IOException, InterruptedException { if (isClosed) return; long newMark = Long.MAX_VALUE; XACommittingTx tx = null; // set new log mark at oldest activeTx entry synchronized(activeTxLock) { for (int i=0; i < activeTx.length; ++i) { tx = activeTx[i]; if (tx == null) continue; long key = tx.getLogKey(); if (key < newMark) newMark = key; } if (newMark < Long.MAX_VALUE) { try { this.mark(newMark, true); } catch (InvalidLogKeyException e) { // will not happen } catch (LogClosedException e) { // will not happen } } } super.close(); }
public void close() throws IOException, InterruptedException { if (isClosed) return; long newMark = Long.MAX_VALUE; XACommittingTx tx = null; // set new log mark at oldest activeTx entry synchronized(activeTxLock) { for (int i=0; i < activeTx.length; ++i) { tx = activeTx[i]; if (tx == null) continue; long key = tx.getLogKey(); if (key < newMark) newMark = key; } if (newMark < Long.MAX_VALUE) { try { this.mark(newMark, true); } catch (InvalidLogKeyException e) { // will not happen } catch (LogClosedException e) { // will not happen } } } super.close(); }
public void close() throws IOException, InterruptedException { if (isClosed) return; long newMark = Long.MAX_VALUE; XACommittingTx tx = null; // set new log mark at oldest activeTx entry synchronized(activeTxLock) { for (int i=0; i < activeTx.length; ++i) { tx = activeTx[i]; if (tx == null) continue; long key = tx.getLogKey(); if (key < newMark) newMark = key; } if (newMark < Long.MAX_VALUE) { try { this.mark(newMark, true); } catch (InvalidLogKeyException e) { // will not happen } catch (LogClosedException e) { // will not happen } } } super.close(); }