/** * Creates a {@link DeltaAndSnapshotStore.WaveletAccess} instance which wraps * {@code deltasAccess}. * * @throws IllegalStateException if the delta history is bad */ private static WaveletAccess createWaveletAccess(DeltaStore.DeltasAccess deltasAccess) throws PersistenceException { ReadableWaveletData wavelet; wavelet = deltasAccess.isEmpty() ? null : buildWaveletFromDeltaReader(deltasAccess); return new DeltasAccessBasedWaveletAccess(deltasAccess, wavelet); }
@Override public boolean isEmpty() { // Don't use the underlying deltasAccess method, rather let this // be controlled by our own state. return getSnapshot() == null; }
@Override public HashedVersion getEndVersion() { // Don't use the underlying deltasAccess method, rather let this // be controlled by our own state. return getSnapshot().getHashedVersion(); }