Package com.google.walkaround.slob.server

Examples of com.google.walkaround.slob.server.MutationLog.reconstruct()


        throw new RuntimeException("Failed to parse obsolete metadata: " + metadataString);
      }
      Assert.check(metadata.hasUdwMetadata(), "Metadata not udw: %s, %s", udwId, metadataString);
      convId = new SlobId(metadata.getUdwMetadata().getAssociatedConvId());
      udwOwner = new StableUserId(metadata.getUdwMetadata().getOwner());
      raw = l.reconstruct(null);
    } finally {
      tx.rollback();
    }
    WaveletName waveletName = IdHack.udwWaveletNameFromConvObjectIdAndUdwObjectId(convId, udwId);
    // TODO(ohler): avoid serialization/deserialization here
View Full Code Here


      if (metadata.hasImportMetadata()
          && !metadata.getImportMetadata().getImportFinished()) {
        throw new WaveletLockedException("Conv " + id + " locked: " + metadata);
      }
      MutationLog l = convStore.create(tx, id);
      raw = l.reconstruct(null);
    } finally {
      tx.rollback();
    }
    WaveletName waveletName = IdHack.convWaveletNameFromConvObjectId(id);
    // TODO(ohler): avoid serialization/deserialization here
View Full Code Here

      throws PermanentFailure, RetryableFailure {
    StateAndVersion raw;
    CheckedTransaction tx = datastore.beginTransaction();
    try {
      MutationLog l = udwStore.create(tx, udwId);
      raw = l.reconstruct(null);
    } finally {
      tx.rollback();
    }
    WaveletName waveletName = IdHack.udwWaveletNameFromConvObjectIdAndUdwObjectId(convId, udwId);
    // TODO(ohler): avoid serialization/deserialization here
View Full Code Here

                  return new Permissions(false, false);
                }
                // Can't use SlobStore here, that would be a cyclic dependency.
                MutationLog mutationLog = convSlobFacilities.getMutationLogFactory()
                    .create(tx, slobId);
                StateAndVersion stateAndVersion = mutationLog.reconstruct(null);
                if (stateAndVersion.getVersion() == 0) {
                  log.info(slobId + " does not exist; " + participantId + " may not access");
                  return new Permissions(false, false);
                }
                // TODO(ohler): introduce generics to avoid the cast.
View Full Code Here

                Assert.check(metadata.hasImportMetadata(), "%s: Metadata has no import: %s",
                    convId, metadata);
                Assert.check(metadata.getImportMetadata().getImportFinished(),
                    "%s: still importing: %s", convId, metadata);
                MutationLog l = convSlobFacilities.getMutationLogFactory().create(tx, convId);
                StateAndVersion stateAndVersion = l.reconstruct(null);
                Assert.check(stateAndVersion.getVersion() > 0, "%s at version 0: %s",
                    convId, stateAndVersion);
                // TODO(ohler): use generics to avoid the cast
                ReadableWaveletObject state = (ReadableWaveletObject) stateAndVersion.getState();
                if (state.getParticipants().contains(importingUser)) {
View Full Code Here

            for (long version = start; it.hasNext(); version++) {
              items.add(Pair.of(version, "" + it.next()));
            }
          }
          if (!snapshotVersion.isEmpty()) {
            snapshot = mutationLog.reconstruct(Long.parseLong(snapshotVersion))
                .getState().snapshot();
          }
        } finally {
          tx.rollback();
        }
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.