Search in sources :

Example 11 with OHashTableDirectoryException

use of com.orientechnologies.orient.core.exception.OHashTableDirectoryException in project orientdb by orientechnologies.

the class OHashTableDirectory method create.

public void create() throws IOException {
    startOperation();
    try {
        OAtomicOperation atomicOperation = startAtomicOperation(false);
        acquireExclusiveLock();
        try {
            fileId = addFile(atomicOperation, getFullName());
            init();
            endAtomicOperation(false, null);
        } catch (IOException e) {
            endAtomicOperation(true, e);
            throw e;
        } catch (Exception e) {
            endAtomicOperation(true, e);
            throw OException.wrapException(new OHashTableDirectoryException("Error during creation of hash table", this), e);
        } finally {
            releaseExclusiveLock();
        }
    } finally {
        completeOperation();
    }
}
Also used : OAtomicOperation(com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation) OHashTableDirectoryException(com.orientechnologies.orient.core.exception.OHashTableDirectoryException) IOException(java.io.IOException) OHashTableDirectoryException(com.orientechnologies.orient.core.exception.OHashTableDirectoryException) OException(com.orientechnologies.common.exception.OException) IOException(java.io.IOException)

Aggregations

OException (com.orientechnologies.common.exception.OException)11 OHashTableDirectoryException (com.orientechnologies.orient.core.exception.OHashTableDirectoryException)11 OAtomicOperation (com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation)11 IOException (java.io.IOException)11 OCacheEntry (com.orientechnologies.orient.core.storage.cache.OCacheEntry)2