private void checkNullSupport(final K key) { if (key == null && !nullKeyIsSupported) { throw new OLocalHashTableException("Null keys are not supported.", this); } }
@Override public void close() { acquireExclusiveLock(); try { flush(); directory.close(); readCache.closeFile(fileStateId, true, writeCache); readCache.closeFile(fileId, true, writeCache); } catch (final IOException e) { throw OException.wrapException(new OLocalHashTableException("Error during hash table close", this), e); } finally { releaseExclusiveLock(); } }
@Override public long size() { atomicOperationsManager.acquireReadLock(this); try { acquireSharedLock(); try { final OAtomicOperation atomicOperation = OAtomicOperationsManager.getCurrentOperation(); final OCacheEntry hashStateEntry = loadPageForRead(atomicOperation, fileStateId, hashStateEntryIndex, true); try { final OHashIndexFileLevelMetadataPage metadataPage = new OHashIndexFileLevelMetadataPage(hashStateEntry, false); return metadataPage.getRecordsCount(); } finally { releasePageFromRead(atomicOperation, hashStateEntry); } } finally { releaseSharedLock(); } } catch (final IOException e) { throw OException.wrapException(new OLocalHashTableException("Error during index size request", this), e); } finally { atomicOperationsManager.releaseReadLock(this); } }
throw OException.wrapException(new OLocalHashTableException("Exception during hash table loading", this), e); } finally { releaseExclusiveLock();
throw OException.wrapException(new OLocalHashTableException("Exception during data read", this), ioe); } finally { atomicOperationsManager.releaseReadLock(this);
throw OException.wrapException(new OLocalHashTableException("Exception during data read", this), ioe); } finally { atomicOperationsManager.releaseReadLock(this);
throw OException.wrapException(new OLocalHashTableException("Exception during data retrieval", this), ioe); } finally { atomicOperationsManager.releaseReadLock(this);
throw OException.wrapException(new OLocalHashTableException("Exception during data read", this), ioe); } finally { atomicOperationsManager.releaseReadLock(this);
throw OException.wrapException(new OLocalHashTableException("Error during data retrieval", this), ioe); } finally { atomicOperationsManager.releaseReadLock(this);
throw OException.wrapException(new OLocalHashTableException("Exception during data read", this), ioe); } finally { atomicOperationsManager.releaseReadLock(this);