Examples of RecordId


Examples of com.dyn.client.v3.traffic.domain.RecordId

public class RecordIdBinder implements Binder {
   @SuppressWarnings("unchecked")
   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object recordId) {
      RecordId valueToAppend = RecordId.class.cast(checkNotNull(recordId, "recordId"));
      URI path = uriBuilder(request.getEndpoint()).appendPath("/{type}Record/{zone}/{fqdn}/{id}").build(
            ImmutableMap.<String, Object> builder()
                        .put("type", valueToAppend.getType())
                        .put("zone", valueToAppend.getZone())
                        .put("fqdn", valueToAppend.getFQDN())
                        .put("id", valueToAppend.getId()).build());
      return (R) request.toBuilder().endpoint(path).build();
   }
View Full Code Here

Examples of org.apache.derby.impl.store.raw.data.RecordId

    during roll forward.  This is used as a hint by logical undo as a good
    place to look for the record to apply the roll back.
  */
  public RecordHandle getRecordHandle()
  {
    return new RecordId(getPageId(), recordId);
  }
View Full Code Here

Examples of org.apache.derby.impl.store.raw.data.RecordId

    during roll forward.  This is used as a hint by logical undo as a good
    place to look for the record to apply the roll back.
  */
  public RecordHandle getRecordHandle()
  {
    return new RecordId(getPageId(), recordId);
  }
View Full Code Here

Examples of org.apache.derby.impl.store.raw.data.RecordId

    during roll forward.  This is used as a hint by logical undo as a good
    place to look for the record to apply the roll back.
  */
  public RecordHandle getRecordHandle()
  {
    return new RecordId(getPageId(), recordId);
  }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.RecordId

        }

        journalFile = new RandomAccessFile(
                new File(directory, JOURNAL_FILE_NAME), "rw");

        RecordId id = null;
        String line = journalFile.readLine();
        while (line != null) {
            int space = line.indexOf(' ');
            if (space != -1) {
                id = RecordId.fromString(line.substring(0, space));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.RecordId

        flushThread.start();
    }

    public void flush() throws IOException {
        synchronized (persistedHead) {
            RecordId before = persistedHead.get();
            RecordId after = head.get();
            if (!after.equals(before)) {
                // needs to happen outside the synchronization block below to
                // avoid a deadlock with another thread flushing the writer
                getWriter().flush();

                synchronized (this) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.RecordId

            public RecordId getHead() {
                return head.get();
            }
            @Override
            public boolean setHead(RecordId before, RecordId after) {
                RecordId id = head.get();
                return id.equals(before) && head.compareAndSet(id, after);
            }
            @Override
            public void merge() {
                throw new UnsupportedOperationException();
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.RecordId

    public MemoryJournal(SegmentStore store, NodeState head) {
        this.store = checkNotNull(store);
        this.parent = null;

        SegmentWriter writer = store.getWriter();
        RecordId id = writer.writeNode(head).getRecordId();
        writer.flush();

        this.base = id;
        this.head = id;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.RecordId

            Segment segment = writer.getDummySegment();
            NodeState before = new SegmentNodeState(segment, base);
            NodeState after = new SegmentNodeState(segment, head);

            while (!parent.setHead(base, head)) {
                RecordId newBase = parent.getHead();
                NodeBuilder builder =
                        new SegmentNodeState(segment, newBase).builder();
                after.compareAgainstBaseState(before, new MergeDiff(builder));
                NodeState state = builder.getNodeState();

                RecordId newHead = writer.writeNode(state).getRecordId();

                base = newBase;
                head = newHead;
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.RecordId

        DBObject id = new BasicDBObject("_id", "root");
        state = journals.findOne(id, null, primaryPreferred());
        if (state == null) {
            SegmentWriter writer = store.getWriter();
            RecordId headId = writer.writeNode(head).getRecordId();
            writer.flush();
            state = new BasicDBObject(of(
                    "_id""root",
                    "head", headId.toString()));
            try {
                journals.insert(state, concern);
            } catch (MongoException.DuplicateKey e) {
                // Someone else managed to concurrently create the journal,
                // so let's just re-read it from the database
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.