Пример #1
0
  @Override
  public NavigableSet<ByteStringMessage<ProtocolAppliedWaveletDelta>> requestHistory(
      ProtocolHashedVersion versionStart, ProtocolHashedVersion versionEnd)
      throws WaveletStateException {
    acquireReadLock();
    try {
      assertStateOk();
      // TODO: ### validate requested range.
      // TODO: #### make immutable.

      NavigableSet<ByteStringMessage<ProtocolAppliedWaveletDelta>> set =
          appliedDeltas.subSet(
              appliedDeltas.floor(emptyAppliedDeltaAtVersion(versionStart.getVersion())),
              true,
              emptyAppliedDeltaAtVersion(versionEnd.getVersion()),
              false);
      LOG.info(
          "### HR "
              + versionStart.getVersion()
              + " - "
              + versionEnd.getVersion()
              + " set - "
              + set.size()
              + " = "
              + set);
      return set;
    } finally {
      releaseReadLock();
    }
  }
Пример #2
0
 @Override
 public NavigableSet<ProtocolWaveletDelta> requestTransformedHistory(
     ProtocolHashedVersion versionStart, ProtocolHashedVersion versionEnd)
     throws WaveletStateException {
   acquireReadLock();
   try {
     assertStateOk();
     // TODO: ### validate requested range.
     // TODO: #### make immutable.
     return transformedDeltas.subSet(
         transformedDeltas.floor(emptyDeltaAtVersion(versionStart.getVersion())),
         true,
         emptyDeltaAtVersion(versionEnd.getVersion()),
         false);
   } finally {
     releaseReadLock();
   }
 }