Refactor snapshot message processing to RaftActorSnapshotMessageSupport 66/17266/4
authorTom Pantelis <tpanteli@brocade.com>
Thu, 26 Mar 2015 18:07:48 +0000 (14:07 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 8 Apr 2015 05:12:54 +0000 (01:12 -0400)
Refactored the snapshot message handling to a new class
RaftActorSnapshotMessageSupport.  To handle the callbacks to the
RaftActor, the RaftAciorRecoverySupport takes a RaftActorSnapshotCohort interface.
The abstract on* methods in RaftActor are now defined in the
RaftActorSnapshotCohort interface. The derived RaftActor class
implements an abstract method to return a RaftActorSnapshotCohort
instance.

Shard returns an instance of a new class ShardSnapshotCohort. For
createSnapshot, it needs to create a Shard transaction actor so I
refactored out a ShardTransactionActorFactory from Shard which is
also used for transaction create messages.

The ShardTransaction constructor previously took a SchemaContext is no
longer used. Rather than storing the SchemaContext in
ShardTransactionActorFactory and keeoing it up to date, I removed
SchemaContext from ShardTransaction which cascaded changes down to the
derived actor classes and unit tests.

Change-Id: I45c2e7cd31b07fec10585b8e5e0495b96842d37c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

No differences found