public interface MergeStrategy
FallbackKVDatabase when migrating from one underlying database to another.| Modifier and Type | Method and Description |
|---|---|
void |
mergeAndCommit(KVTransaction src,
KVTransaction dst,
Date lastActiveTime)
Merge data from the source database being migrated away from into the destination database being migrated to.
|
void mergeAndCommit(KVTransaction src, KVTransaction dst, Date lastActiveTime)
This method should commit() both transactions before returning; src
should be committed before dst.
If an exception is thrown, rollback() will be invoked on both transactions
(a rollback() on an already-commit()'ed
transaction does nothing).
src - read-only view into the database being migrated away fromdst - read-write transaction open on the database being migrated tolastActiveTime - time that dst was last active, or null if neverRuntimeException - if the merge or either commit() failsCopyright © 2016. All rights reserved.