@Override public boolean isFrozen() { if (!(getStorage() instanceof OFreezableStorageComponent)) return false; final OFreezableStorageComponent storage = getFreezableStorage(); if (storage != null) return storage.isFrozen(); return false; }
@Override public final void release() { try { for (final OBaseIndexEngine indexEngine : indexEngines) { if (indexEngine instanceof OFreezableStorageComponent) { ((OFreezableStorageComponent) indexEngine).release(); } } atomicOperationsManager.releaseAtomicOperations(-1); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
/** * {@inheritDoc} */ @Override public void freeze(final boolean throwException) { checkOpenness(); if (!(getStorage() instanceof OFreezableStorageComponent)) { OLogManager.instance().error(this, "Only local paginated storage supports freeze. If you are using remote client please use OServerAdmin instead", null); return; } final long startTime = Orient.instance().getProfiler().startChrono(); final OFreezableStorageComponent storage = getFreezableStorage(); if (storage != null) { storage.freeze(throwException); } Orient.instance().getProfiler() .stopChrono("db." + getName() + ".freeze", "Time to freeze the database", startTime, "db.*.freeze"); }
/** * {@inheritDoc} */ @Override public void freeze() { checkOpenness(); if (!(getStorage() instanceof OFreezableStorageComponent)) { OLogManager.instance().error(this, "Only local paginated storage supports freeze. " + "If you use remote client please use OServerAdmin instead", null); return; } final long startTime = Orient.instance().getProfiler().startChrono(); final OFreezableStorageComponent storage = getFreezableStorage(); if (storage != null) { storage.freeze(false); } Orient.instance().getProfiler() .stopChrono("db." + getName() + ".freeze", "Time to freeze the database", startTime, "db.*.freeze"); }
/** * {@inheritDoc} */ @Override public void release() { checkOpenness(); if (!(getStorage() instanceof OFreezableStorageComponent)) { OLogManager.instance().error(this, "Only local paginated storage supports release. If you are using remote client please use OServerAdmin instead", null); return; } final long startTime = Orient.instance().getProfiler().startChrono(); final OFreezableStorageComponent storage = getFreezableStorage(); if (storage != null) { storage.release(); } Orient.instance().getProfiler() .stopChrono("db." + getName() + ".release", "Time to release the database", startTime, "db.*.release"); }