|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RecoveryStrategy
The RecoveryStrategy
interface provides methods that
must be implemented by a particular recovery service. These methods
will be invoked in response to a corresponding failure event, that
the method intend to rectify.
All implementations of this interface that are to be used through
the ReplicationManager
must implement a no-argument
constructor. Initialization of a particular recovery strategy
should occur in the initialize
method.
AbstractRecoveryStrategy
,
KeepMinimalInPartition
,
KeepInitialInPartition
Method Summary | |
---|---|
boolean |
handleFailure(HostSet hosts)
Handle multiple simulatenous failures; this may either be due to a network partitioning scenario or if several members of the group failed at the same time. |
void |
initialize(DistributionScheme distScheme,
AppConfig app)
Initialize the recovery strategy for the given application. |
boolean |
needsRecovery()
Returns true if the associated application needs a recovery action, otherwise false is returned. |
boolean |
prepareRecovery()
Invoked to initialize the recovery strategy implementation for the provided application. |
boolean |
relocateReplica(Host host)
Relocate the application replica that were running on the given host. |
boolean |
restartReplica(Host host)
Restart the given replica on the given host. |
Method Detail |
---|
void initialize(DistributionScheme distScheme, AppConfig app)
boolean needsRecovery()
boolean prepareRecovery()
boolean handleFailure(HostSet hosts)
hosts
- The set of hosts on which the application were running.
boolean restartReplica(Host host)
host
- The host on which the replica was running.
boolean relocateReplica(Host host)
DistributionScheme
provided by the replication
manager.
host
- The host on which the replica were running.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |