From: Tom Pantelis Date: Thu, 26 Mar 2015 18:07:48 +0000 (-0400) Subject: Refactor snapshot message processing to RaftActorSnapshotMessageSupport X-Git-Tag: release/lithium~287^2~1 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=7df9909614131c0870267732277d7aa78501afdc;hp=7df9909614131c0870267732277d7aa78501afdc Refactor snapshot message processing to RaftActorSnapshotMessageSupport 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 ---