/** * Cleanly closes this back-end, and releases any system resources associated with it. All modifications are saved * before closing. * <p> * If the back-end is already closed, then invoking this method has no effect. * * @param clean {@code true} if the registry must be cleaned after closure */ void close(boolean clean) { if (isClosed) { return; } if (clean && isPersistent()) { BackendManager.getInstance().unregister(this); } try { save(); internalClose(); } catch (Exception e) { Log.warn(e); } finally { isClosed = true; } }