/** * Closes RRD. No further operations are allowed on this RrdDb object. * * @throws IOException Thrown in case of I/O related error. */ public synchronized void close() throws IOException { if (!closed) { closed = true; backend.close(); } }
/** * Check that all phantom reference are indeed safely closed. */ public void checkClosing() { while(true) { ClosingReference ref = (ClosingReference) refQueue.poll(); if (ref == null) { break; } else if (ref.backend != null) { try { ref.backend.close(); } catch (IOException e) { } } } }
@Override public void clear() { try { backend.close(); } catch (IOException e) { } backend = null; super.clear(); } }
/** * Closes the underlying backend. Call by {@code RrdDb#close()} when it's closed. All subclass must keep calling it. * * @throws java.io.IOException Thrown in case of I/O error */ protected void rrdClose() throws IOException { try { close(); } finally { if (ref != null) { ref.clear(); } } }
backend.close(); throw e;
backend.close(); throw e;
backend.close(); throw e;