Package io.permazen.kv.raft.fallback
Class NullMergeStrategy
java.lang.Object
io.permazen.kv.raft.fallback.NullMergeStrategy
- All Implemented Interfaces:
MergeStrategy
MergeStrategy
that does nothing, i.e., it leaves the destination database unmodified.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
mergeAndCommit
(KVTransaction src, KVTransaction dst, Date lastActiveTime) Merge data from the source database being migrated away from into the destination database being migrated to.toString()
-
Constructor Details
-
NullMergeStrategy
public NullMergeStrategy()
-
-
Method Details
-
mergeAndCommit
Description copied from interface:MergeStrategy
Merge data from the source database being migrated away from into the destination database being migrated to.This method should
commit()
both transactions before returning;src
should be committed beforedst
.If an exception is thrown,
rollback()
will be invoked on both transactions (arollback()
on an already-commit()
'ed transaction does nothing).- Specified by:
mergeAndCommit
in interfaceMergeStrategy
- Parameters:
src
- read-only view into the database being migrated away fromdst
- read-write transaction open on the database being migrated tolastActiveTime
- time thatdst
was last active, or null if never
-
toString
-