use of com.orientechnologies.orient.core.exception.OLocalHashTableException in project orientdb by orientechnologies.
the class OLocalHashTable method delete.
@Override
public void delete() {
startOperation();
try {
final OAtomicOperation atomicOperation;
try {
atomicOperation = startAtomicOperation(false);
} catch (IOException e) {
throw OException.wrapException(new OLocalHashTableException("Error during hash table deletion", this), e);
}
acquireExclusiveLock();
try {
directory.delete();
deleteFile(atomicOperation, fileStateId);
deleteFile(atomicOperation, fileId);
if (nullKeyIsSupported)
deleteFile(atomicOperation, nullBucketFileId);
endAtomicOperation(false, null);
} catch (IOException e) {
rollback(e);
throw OException.wrapException(new OLocalHashTableException("Exception during index deletion", this), e);
} catch (Exception e) {
rollback(e);
throw OException.wrapException(new OLocalHashTableException("Exception during index deletion", this), e);
} finally {
releaseExclusiveLock();
}
} finally {
completeOperation();
}
}
Aggregations