Package com.orientechnologies.orient.core.exception

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


      // 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


      close();
      throw e;

    } catch (IOException e) {
      close();
      throw new OStorageException("Error on creation of storage: " + name, e);

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

    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

      if (c == null)
        c = excClass.getConstructor(String.class);

    } catch (Exception e) {
      // UNABLE TO REPRODUCE THE SAME SERVER-SIZE EXCEPTION: THROW A STORAGE EXCEPTION
      rootException = new OStorageException(iMessage, iPrevious);
    }

    if (c != null)
      try {
        if (c.getParameterTypes().length > 1)
View Full Code Here

      close();
      throw e;

    } catch (IOException e) {
      close();
      throw new OStorageException("Error on creation of storage: " + name, e);

    } finally {
      lock.releaseExclusiveLock();
    }
  }
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.