Package com.orientechnologies.orient.core.storage

Examples of com.orientechnologies.orient.core.storage.OPhysicalPosition


  public void setPhysicalPosition(final long iPosition, final int iDataId, final long iDataPosition, final byte iRecordType) {
    acquireExclusiveLock();
    try {

      final OPhysicalPosition ppos = entries.get((int) iPosition);
      ppos.dataSegment = iDataId;
      ppos.dataPosition = iDataPosition;
      ppos.type = iRecordType;

    } finally {
View Full Code Here


  }

  protected void deleteRecord(final int iTxId, final OCluster iClusterSegment, final long iPosition, final int iVersion) {
    try {
      // GET THE PPOS OF THE RECORD
      final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iPosition, new OPhysicalPosition());

      if (!storage.checkForRecordValidity(ppos))
        // ALREADY DELETED
        return;
View Full Code Here

    lock.acquireSharedLock();
    try {
      lockManager.acquireLock(Thread.currentThread(), iRid, LOCK.SHARED);

      try {
        final OPhysicalPosition ppos = iClusterSegment.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());

        if (ppos == null)
          return null;

        return new ORawBuffer(data.readRecord(ppos.dataPosition), ppos.version, ppos.type);
View Full Code Here

    try {

      lockManager.acquireLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      try {

        final OPhysicalPosition ppos = cluster.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());
        if (ppos == null)
          return -1;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
        if (iVersion > -1 && ppos.version != iVersion)
View Full Code Here

    try {

      lockManager.acquireLock(Thread.currentThread(), iRid, LOCK.EXCLUSIVE);
      try {

        final OPhysicalPosition ppos = cluster.getPhysicalPosition(iRid.clusterPosition, new OPhysicalPosition());

        if (ppos == null)
          return false;

        // MVCC TRANSACTION: CHECK IF VERSION IS THE SAME
View Full Code Here

    long minTs = Long.MAX_VALUE;

    OStorage baseStorage = base_db.getStorage();

    OPhysicalPosition[] physicalPositions = baseStorage.ceilingPhysicalPositions(defaultClusterId, new OPhysicalPosition(
        OClusterPositionFactory.INSTANCE.valueOf(0)));

    int recordsRestored = 0;
    int recordsTested = 0;
    while (physicalPositions.length > 0) {
View Full Code Here

    long minTs = Long.MAX_VALUE;
    int clusterId = baseDocumentTx.getClusterIdByName("TestClass");

    OStorage baseStorage = baseDocumentTx.getStorage();

    OPhysicalPosition[] physicalPositions = baseStorage.ceilingPhysicalPositions(clusterId, new OPhysicalPosition(
        OClusterPositionFactory.INSTANCE.valueOf(0)));

    int recordsRestored = 0;
    int recordsTested = 0;
    while (physicalPositions.length > 0) {
View Full Code Here

    long minTs = Long.MAX_VALUE;
    int clusterId = baseDocumentTx.getClusterIdByName("TestClass");

    OStorage baseStorage = baseDocumentTx.getStorage();

    OPhysicalPosition[] physicalPositions = baseStorage.ceilingPhysicalPositions(clusterId, new OPhysicalPosition(
        OClusterPositionFactory.INSTANCE.valueOf(0)));

    int recordsRestored = 0;
    int recordsTested = 0;
    while (physicalPositions.length > 0) {
View Full Code Here

    return null;
  }

  protected boolean nextPosition() {
    if (positionsToProcess == null) {
      positionsToProcess = dbStorage.ceilingPhysicalPositions(current.clusterId, new OPhysicalPosition(firstClusterEntry));
      if (positionsToProcess == null)
        return false;
    } else {
      if (currentEntry.compareTo(lastClusterEntry) >= 0)
        return false;
View Full Code Here

    return true;
  }

  protected boolean prevPosition() {
    if (positionsToProcess == null) {
      positionsToProcess = dbStorage.floorPhysicalPositions(current.clusterId, new OPhysicalPosition(lastClusterEntry));
      if (positionsToProcess == null)
        return false;

      if (positionsToProcess.length == 0)
        return false;
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.storage.OPhysicalPosition

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.