@Override public final ORecordMetadata getRecordMetadata(final ORID rid) { try { if (rid.isNew()) { throw new OStorageException("Passed record with id " + rid + " is new and cannot be stored."); } checkOpenness(); stateLock.acquireReadLock(); try { final OCluster cluster = getClusterById(rid.getClusterId()); checkOpenness(); final OPhysicalPosition ppos = cluster.getPhysicalPosition(new OPhysicalPosition(rid.getClusterPosition())); if (ppos == null) { return null; } return new ORecordMetadata(rid, ppos.recordVersion); } catch (final IOException ioe) { OLogManager.instance().error(this, "Retrieval of record '" + rid + "' cause: " + ioe.getMessage(), ioe); } finally { stateLock.releaseReadLock(); } return null; } catch (final RuntimeException ee) { throw logAndPrepareForRethrow(ee); } catch (final Error ee) { throw logAndPrepareForRethrow(ee); } catch (final Throwable t) { throw logAndPrepareForRethrow(t); } }