Package com.orientechnologies.orient.core.exception

Examples of com.orientechnologies.orient.core.exception.OStorageException


    lock.acquireExclusiveLock();
    try {

      if (!exists())
        throw new OStorageException("Can't open the storage '" + name + "' because it not exists in path: " + url);

      open = true;

    } finally {
      lock.releaseExclusiveLock();
View Full Code Here


      final OCluster cluster = getClusterById(iRid.clusterId);

      iRid.clusterPosition = cluster.addPhysicalPosition(0, offset, iRecordType);
      return iRid.clusterPosition;
    } catch (IOException e) {
      throw new OStorageException("Error on create record in cluster: " + iRid.clusterId, e);

    } finally {
      lock.releaseSharedLock();
      OProfiler.getInstance().stopChrono("OStorageMemory.createRecord", timer);
    }
View Full Code Here

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.SHARED);
      }
    } catch (IOException e) {
      throw new OStorageException("Error on read record in cluster: " + iClusterSegment.getId(), e);

    } finally {
      lock.releaseSharedLock();
      OProfiler.getInstance().stopChrono("OStorageMemory.readRecord", timer);
    }
View Full Code Here

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      }
    } catch (IOException e) {
      throw new OStorageException("Error on update record " + iRid, e);

    } finally {
      lock.releaseSharedLock();
      OProfiler.getInstance().stopChrono("OStorageMemory.updateRecord", timer);
    }
View Full Code Here

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      }

    } catch (IOException e) {
      throw new OStorageException("Error on delete record " + iRid, e);

    } finally {
      lock.releaseSharedLock();
      OProfiler.getInstance().stopChrono("OStorageMemory.deleteRecord", timer);
    }
View Full Code Here

    try {

      return new long[] { cluster.getFirstEntryPosition(), cluster.getLastEntryPosition() };

    } catch (IOException e) {
      throw new OStorageException("Error on getting last entry position in cluster: " + iClusterId, e);
    } finally {
      lock.releaseSharedLock();
    }
  }
View Full Code Here

    lock.acquireSharedLock();
    try {
      final OCluster cluster = getClusterById(currentClusterId);
      return cluster.higherPositions(physicalPosition);
    } catch (IOException ioe) {
      throw new OStorageException("Cluster Id " + currentClusterId + " is invalid in storage '" + name + '\'', ioe);
    } finally {
      lock.releaseSharedLock();
    }
  }
View Full Code Here

    lock.acquireSharedLock();
    try {
      final OCluster cluster = getClusterById(clusterId);
      return cluster.ceilingPositions(physicalPosition);
    } catch (IOException ioe) {
      throw new OStorageException("Cluster Id " + clusterId + " is invalid in storage '" + name + '\'', ioe);
    } finally {
      lock.releaseSharedLock();
    }
  }
View Full Code Here

    try {
      final OCluster cluster = getClusterById(currentClusterId);

      return cluster.lowerPositions(physicalPosition);
    } catch (IOException ioe) {
      throw new OStorageException("Cluster Id " + currentClusterId + " is invalid in storage '" + name + '\'', ioe);
    } finally {
      lock.releaseSharedLock();
    }
  }
View Full Code Here

    try {
      final OCluster cluster = getClusterById(clusterId);

      return cluster.floorPositions(physicalPosition);
    } catch (IOException ioe) {
      throw new OStorageException("Cluster Id " + clusterId + " is invalid in storage '" + name + '\'', ioe);
    } finally {
      lock.releaseSharedLock();
    }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.OStorageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.