@Override public WaveletName getWaveletName() { return delegate().getWaveletName(); }
/** * Reads all deltas from persistent storage. */ private static ImmutableList<WaveletDeltaRecord> readAll(WaveletDeltaRecordReader reader, ConcurrentNavigableMap<HashedVersion, WaveletDeltaRecord> cachedDeltas) throws IOException { HashedVersion startVersion = HASH_FACTORY.createVersionZero(reader.getWaveletName()); HashedVersion endVersion = reader.getEndVersion(); ListReceiver<WaveletDeltaRecord> receiver = new ListReceiver<WaveletDeltaRecord>(); readDeltasInRange(reader, cachedDeltas, startVersion, endVersion, receiver); return ImmutableList.copyOf(receiver); }
/** * Reads all deltas and applies them all to construct the end wavelet state. */ private static ReadableWaveletData buildWaveletFromDeltaReader(WaveletDeltaRecordReader reader) throws PersistenceException { try { // TODO(soren): better error handling of IllegalStateExceptions and // OperationExceptions thrown from here ReadableWaveletData wavelet = WaveletDataUtil.buildWaveletFromDeltas(reader.getWaveletName(), new TransformedWaveletDeltaIterator(reader)); Preconditions.checkState(wavelet.getHashedVersion().equals(reader.getEndVersion())); return wavelet; } catch (OperationException e) { throw new PersistenceException(e); } catch (RuntimeIOException e) { throw new PersistenceException(e.getIOException()); } }