Examples of ORawBuffer


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

  private boolean compareRecords() {
    listener.onMessage("\nStarting deep comparison record by record. It can takes some minutes. Wait please...");

    int clusterId;

    ORawBuffer buffer1, buffer2;

    for (String clusterName : storage1.getClusterNames()) {
      // CHECK IF THE CLUSTER IS INCLUDED
      if (includeClusters != null) {
        if (!includeClusters.contains(clusterName))
View Full Code Here

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

        if (ppos == null || !checkForRecordValidity(ppos))
          // DELETED
          return null;

        final ODataLocal data = getDataSegment(ppos.dataSegment);
        return new ORawBuffer(data.getRecord(ppos.dataPosition), ppos.version, ppos.type);

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.SHARED);
      }
View Full Code Here

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

  @ConsoleCommand(description = "Display a record as raw bytes")
  public void displayRawRecord(@ConsoleParameter(name = "rid", description = "The record id to display") final String iRecordId) {
    checkCurrentDatabase();

    ORecordId rid = new ORecordId(iRecordId);
    final ORawBuffer buffer = currentDatabase.getStorage().readRecord(currentDatabase, rid, null);

    if (buffer == null)
      throw new OException("The record has been deleted");

    out.println("Raw record content (size=" + buffer.buffer.length + "):\n\n" + new String(buffer.buffer));
View Full Code Here

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

        if (ppos == null || !checkForRecordValidity(ppos))
          // DELETED
          return null;

        final ODataLocal data = getDataSegment(ppos.dataSegment);
        return new ORawBuffer(data.getRecord(ppos.dataPosition), ppos.version, ppos.type);

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.SHARED);
      }
View Full Code Here

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

  @ConsoleCommand(description = "Display a record as raw bytes")
  public void displayRawRecord(@ConsoleParameter(name = "rid", description = "The record id to display") final String iRecordId) {
    checkCurrentDatabase();

    ORecordId rid = new ORecordId(iRecordId);
    final ORawBuffer buffer = currentDatabase.getStorage().readRecord(currentDatabase, rid, null);

    if (buffer == null)
      throw new OException("The record has been deleted");

    out.println("Raw record content (size=" + buffer.buffer.length + "):\n\n" + new String(buffer.buffer));
View Full Code Here

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

        callbackHooks(TYPE.AFTER_READ, record);
        return (RET) record;
      }

      final ORawBuffer recordBuffer = underlying.read(iRid, iFetchPlan);
      if (recordBuffer == null)
        return null;

      if (iRecord == null || iRecord.getRecordType() != recordBuffer.recordType)
        // NO SAME RECORD TYPE: CAN'T REUSE OLD ONE BUT CREATE A NEW ONE FOR IT
View Full Code Here

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

        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);

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.SHARED);
      }
    } catch (IOException e) {
View Full Code Here

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

  protected int updateRecord(final int iTxId, final OCluster iClusterSegment, final ORecordId iRid, final byte[] iContent,
      final int iVersion, final byte iRecordType) {
    try {
      // READ CURRENT RECORD CONTENT
      final ORawBuffer buffer = storage.readRecord(iClusterSegment, iRid, true);

      if (buffer == null)
        throw new OTransactionException("Can't retrieve the updated record #" + iRid);

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

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

      else {
        segment.create(START_SIZE);

        // @COMPATIBILITY0.9.25
        // CHECK FOR OLD VERSION OF DATABASE
        final ORawBuffer rawRecord = storage.readRecord(null, CONFIG_RID, null);
        if (rawRecord != null)
          fromStream(rawRecord.buffer);

        update();
        return this;
View Full Code Here

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

        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);

      } finally {
        lockManager.releaseLock(Thread.currentThread(), iRid, LOCK.SHARED);
      }
    } catch (IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.