@Override
public void logMutations(DataOutput out) {
Preconditions.checkArgument(!batchLoading,"Cannot log entire mutation set when batch-loading is enabled");
VariableLong.writePositive(out,mutations.size());
for (Map.Entry<KCVSCache,Map<StaticBuffer, KCVEntryMutation>> storeMutations : mutations.entrySet()) {
out.writeObjectNotNull(storeMutations.getKey().getName());
VariableLong.writePositive(out,storeMutations.getValue().size());
for (Map.Entry<StaticBuffer,KCVEntryMutation> mutationsForKey : storeMutations.getValue().entrySet()) {
BufferUtil.writeBuffer(out,mutationsForKey.getKey());
KCVEntryMutation mut = mutationsForKey.getValue();
logMutatedEntries(out,mut.getAdditions());
logMutatedEntries(out,mut.getDeletions());
}
}
}