Package com.orientechnologies.orient.core.exception

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


    }
  }

  public long[] getClusterDataRange(final int iClusterId) {
    if (iClusterId == -1)
      throw new OStorageException("Cluster Id is invalid: " + iClusterId);

    checkOpeness();

    final boolean locked = lock.acquireSharedLock();
View Full Code Here


    }
  }

  public long count(final int iClusterId) {
    if (iClusterId == -1)
      throw new OStorageException("Cluster Id is invalid: " + iClusterId);

    // COUNT PHYSICAL CLUSTER IF ANY
    checkOpeness();

    final boolean locked = lock.acquireSharedLock();
View Full Code Here

      for (ODataLocal data : dataSegments)
        data.synch();

    } catch (IOException e) {
      throw new OStorageException("Error on synch", e);
    } finally {
      lock.releaseSharedLock(locked);

      OProfiler.getInstance().stopChrono("storage." + name + ".synch", timer);
    }
View Full Code Here

      // ALREADY OPENED: THIS IS THE CASE WHEN A STORAGE INSTANCE IS
      // REUSED
      return;

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

    open = true;
  }
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(locked);
      OProfiler.getInstance().stopChrono("OStorageMemory.createRecord", timer);
    }
View Full Code Here

      if (ppos == null)
        return null;

      return new ORawBuffer(data.readRecord(ppos.dataPosition), ppos.version, ppos.type);
    } catch (IOException e) {
      throw new OStorageException("Error on read record in cluster: " + iClusterSegment.getId(), e);

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

      data.updateRecord(ppos.dataPosition, iContent);

      return ++(ppos.version);

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

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

      data.deleteRecord(ppos.dataPosition);

      return true;

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

    } finally {
      lock.releaseSharedLock(locked);
      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(locked);
    }
  }
View Full Code Here

      // CHANGE THE POINTMENT OF CLUSTER TO THE NEW POSITION
      final OCluster cluster = storage.getClusterById(clusterId);
      final OPhysicalPosition ppos = cluster.getPhysicalPosition(clusterPosition, new OPhysicalPosition());

      if (ppos.dataPosition != iSourcePosition)
        throw new OStorageException("Found corrupted record hole for rid " + clusterId + ":" + clusterPosition
            + ": data position is wrong: " + ppos.dataPosition + "<->" + iSourcePosition);

      cluster.setPhysicalPosition(clusterPosition, iDestinationPosition);
    }
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.