Package com.orientechnologies.orient.core.storage

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(CONFIG_RID, null, false, null, false, OStorage.LOCKING_STRATEGY.DEFAULT)
            .getResult();
        if (rawRecord != null)
          fromStream(rawRecord.buffer);

        update();
View Full Code Here


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

      final ORawBuffer recordBuffer = underlying.read(rid, iFetchPlan, iIgnoreCache, loadTombstones, iLockingStrategy).getResult();
      if (recordBuffer == null)
        return null;

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

            continue;
          if (isDocumentDatabases() && rid.equals(new ORecordId(storage1.getConfiguration().schemaRecordId))
              && rid.equals(new ORecordId(storage2.getConfiguration().schemaRecordId)))
            continue;

          final ORawBuffer buffer1 = storage1.readRecord(rid, null, true, null, false, OStorage.LOCKING_STRATEGY.DEFAULT)
              .getResult();
          final ORawBuffer buffer2;
          if (ridMapper == null)
            buffer2 = storage2.readRecord(rid, null, true, null, false, OStorage.LOCKING_STRATEGY.DEFAULT).getResult();
          else {
            final ORID newRid = ridMapper.map(rid);
            if (newRid == null)
View Full Code Here

       throws Exception {
     final ORecord record = database.load(rid);
     if (record == null)
       return null;

     return new ORawBuffer(record);
   }
View Full Code Here

    record.recycle(this);
    fromStream(record.toStream());
  }

  protected void load(final OStorage iStorage) {
    final ORawBuffer raw = iStorage.readRecord((ORecordId) record.getIdentity(), null, false, null, false,
        OStorage.LOCKING_STRATEGY.DEFAULT).getResult();
    ORecordInternal.fill(record, (ORecordId) record.getIdentity(), raw.version, raw.buffer, false);
    fromStream(raw.buffer);
  }
View Full Code Here

  protected void load(final OStorage iSt) {
    if (!record.getIdentity().isValid())
      // NOTHING TO LOAD
      return;
    ORawBuffer raw = iSt.readRecord((ORecordId) record.getIdentity(), null, false, null, false, OStorage.LOCKING_STRATEGY.DEFAULT)
        .getResult();
    if (raw == null)
      throw new OConfigurationException("Cannot load map with id " + record.getIdentity());
    record.getRecordVersion().copyFrom(raw.version);
    fromStream(raw.buffer);
View Full Code Here

          beginResponse(network);

          if (network.readByte() == 0)
            return new OStorageOperationResult<ORawBuffer>(null);

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

          final ODatabaseRecord database = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined();
          ORecord record;
          while (network.readByte() == 2) {
            record = (ORecord) OChannelBinaryProtocol.readIdentifiable(network);
View Full Code Here

    db = new ODatabaseRaw("embedded:database/test");
  }

  @Override
  public void cycle() throws UnsupportedEncodingException {
    ORawBuffer buffer;
    objectsRead = 0;

    int clusterId = db.getClusterIdByName(CLUSTER_NAME);

    final ORecordId rid = new ORecordId(clusterId);
View Full Code Here

          OPhysicalPosition[] positions = storage.ceilingPhysicalPositions(clusterId, new OPhysicalPosition(range[0]));
          do {
            for (OPhysicalPosition position : positions) {
              final ORecordId identity = new ORecordId(clusterId, position.clusterPosition);
              final ORawBuffer record = storage.readRecord(identity, null, true, null, false, OStorage.LOCKING_STRATEGY.DEFAULT)
                  .getResult();

              if (record.recordType == ODocument.RECORD_TYPE) {
                final ORecordSerializerSchemaAware2CSV serializer = (ORecordSerializerSchemaAware2CSV) ORecordSerializerFactory
                    .instance().getFormat(ORecordSerializerSchemaAware2CSV.NAME);
View Full Code Here

TOP

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

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.