protected final Error logAndPrepareForRethrow(final Error error) { return logAndPrepareForRethrow(error, true); }
@Override public final void close(final boolean force, final boolean onDelete) { try { doClose(force, onDelete); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
public final void releaseReadLock(final ORID rid) { try { lockManager.releaseLock(this, rid, OComparableLockManager.LOCK.SHARED); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final boolean checkForRecordValidity(final OPhysicalPosition ppos) { try { return ppos != null && !ORecordVersionHelper.isTombstone(ppos.recordVersion); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final boolean isFrozen() { try { return atomicOperationsManager.isFrozen(); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
public final void releaseWriteLock(final ORID rid) { try { lockManager.releaseLock(this, rid, OComparableLockManager.LOCK.EXCLUSIVE); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
public final void acquireWriteLock(final ORID rid) { try { lockManager.acquireLock(rid, OComparableLockManager.LOCK.EXCLUSIVE, RECORD_LOCK_TIMEOUT); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
public final void acquireReadLock(final ORID rid) { try { lockManager.acquireLock(rid, OComparableLockManager.LOCK.SHARED, RECORD_LOCK_TIMEOUT); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
public OLogSequenceNumber getLSN() { try { if (writeAheadLog == null) { return null; } return writeAheadLog.end(); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final void reload() { try { close(); open(null, null, null); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
public OBaseIndexEngine getIndexEngine(int indexId) throws OInvalidIndexEngineIdException { indexId = extractInternalId(indexId); try { checkIndexId(indexId); return indexEngines.get(indexId); } catch (final OInvalidIndexEngineIdException ie) { throw logAndPrepareForRethrow(ie); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@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); } }
@Override public final void requestCheckpoint() { try { if (!walVacuumInProgress.get() && walVacuumInProgress.compareAndSet(false, true)) { fuzzyCheckpointExecutor.submit(new WALVacuum()); } } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
/** * Method that completes the cluster rename operation. <strong>IT WILL NOT RENAME A CLUSTER, IT JUST CHANGES THE NAME IN THE * INTERNAL MAPPING</strong> */ public void renameCluster(final String oldName, final String newName) { try { clusterMap.put(newName.toLowerCase(configuration.getLocaleInstance()), clusterMap.remove(oldName.toLowerCase(configuration.getLocaleInstance()))); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final boolean isClosed() { try { stateLock.acquireReadLock(); try { return super.isClosed(); } finally { stateLock.releaseReadLock(); } } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final Set<String> getClusterNames() { try { checkOpenness(); stateLock.acquireReadLock(); try { checkOpenness(); return new HashSet<>(clusterMap.keySet()); } finally { stateLock.releaseReadLock(); } } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final int getClusters() { try { checkOpenness(); stateLock.acquireReadLock(); try { checkOpenness(); return clusterMap.size(); } finally { stateLock.releaseReadLock(); } } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final OStorageOperationResult<ORawBuffer> readRecordIfVersionIsNotLatest(final ORecordId rid, final String fetchPlan, final boolean ignoreCache, final int recordVersion) throws ORecordNotFoundException { try { checkOpenness(); return new OStorageOperationResult<>(readRecordIfNotLatest(getClusterById(rid.getClusterId()), rid, recordVersion)); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
private OClusterBrowsePage nextPage(final int clusterId, final long lastPosition) { try { checkOpenness(); stateLock.acquireReadLock(); try { checkOpenness(); final OCluster cluster = doGetAndCheckCluster(clusterId); return cluster.nextPage(lastPosition); } finally { stateLock.releaseReadLock(); } } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }
@Override public final void clearProperties() { checkOpenness(); stateLock.acquireWriteLock(); try { checkOpenness(); final OStorageConfigurationImpl storageConfiguration = (OStorageConfigurationImpl) configuration; storageConfiguration.clearProperties(); storageConfiguration.update(); } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } finally { stateLock.releaseWriteLock(); } }