Examples of ORawBuffer


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

          beginResponse(network);

          if (network.readByte() == 0)
            return null;

          final ORawBuffer buffer = new ORawBuffer(network.readBytes(), network.readInt(), network.readByte());

          ORecordInternal<?> record;
          while (network.readByte() == 2) {
            record = (ORecordInternal<?>) readIdentifiable(network, iDatabase);
View Full Code Here

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

          beginResponse(network);

          if (network.readByte() == 0)
            return null;

          final ORawBuffer buffer = new ORawBuffer(network.readBytes(), network.readInt(), network.readByte());

          ORecordInternal<?> record;
          while (network.readByte() == 2) {
            record = (ORecordInternal<?>) readRecordFromNetwork(network, iDatabase);
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);
      }
    } 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);

      final long dataOffset;
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, CONFIGURATION_RID, null);
        if (rawRecord != null)
          fromStream(rawRecord.buffer);

        update();
        return this;
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);
    } catch (IOException e) {
      throw new OStorageException("Error on read record in cluster: " + iClusterSegment.getId(), e);

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

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

  }

  @Override
  public OMVRBTreePersistent<K, V> load() throws IOException {
    ((ORecordId) record.getIdentity()).clusterId = clusterId;
    ORawBuffer raw = storage.readRecord(null, (ORecordId) record.getIdentity(), null);

    if (raw == null)
      throw new OConfigurationException("Can't load map with id " + clusterId + ":" + record.getIdentity().getClusterPosition());

    record.setVersion(raw.version);
View Full Code Here

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

    load();
  }

  @Override
  public OMVRBTreeEntryStorage<K, V> load() throws IOException {
    ORawBuffer raw = ((OMVRBTreeStorage<K, V>) tree).storage.readRecord(null, (ORecordId) record.getIdentity(), null);

    record.setVersion(raw.version);

    fromStream(raw.buffer);
    super.load();
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
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.