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(); }
mark(newMark, true); // force = true } catch (InvalidLogKeyException e) { // should never happen System.err.println(e.toString());
mark(newMark, true); // force = true } catch (InvalidLogKeyException e) { // should never happen System.err.println(e.toString());
mark(newMark, true); // force = true } catch (InvalidLogKeyException e) { // should never happen System.err.println(e.toString());