jgroup.arm.recovery
Class KeepMinimalInPartition
java.lang.Object
jgroup.arm.recovery.AbstractRecoveryStrategy
jgroup.arm.recovery.KeepMinimalInPartition
- All Implemented Interfaces:
- RecoveryStrategy
- Direct Known Subclasses:
- KeepInitialInPartition
public class KeepMinimalInPartition
- extends AbstractRecoveryStrategy
If the current number of replicas falls below the minimal redundancy
specified for this replica, and the number of available hosts in
this partition is greater than the minimal redundancy then create
new replicas to compensate for the lost redundancy.
- Since:
- Jgroup 1.2
- Author:
- Hein Meling
Method Summary |
boolean |
handleFailure(HostSet hosts)
FIXME UPDATE DOCUMENTATION:
The KeepMinimalInPartition implementation simply
assume that the servers do not maintain any state or has some
other means of recovering their state, and tries to relocate
the replicas to a new set of hosts. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeepMinimalInPartition
public KeepMinimalInPartition()
handleFailure
public boolean handleFailure(HostSet hosts)
- FIXME UPDATE DOCUMENTATION:
The
KeepMinimalInPartition
implementation simply
assume that the servers do not maintain any state or has some
other means of recovering their state, and tries to relocate
the replicas to a new set of hosts.
- Parameters:
hosts
- The set of hosts on which the application was running,
but has now failed.
- Returns:
- True if all replicas replacement repliacs has been created successfully,
false otherwise.
restartReplica
public boolean restartReplica(Host host)
- Description copied from interface:
RecoveryStrategy
- Restart the given replica on the given host. This method differes
from the one below in that it will try to instatiate the replica
on the same host on which the failed replica was running. That is
it will be invoked only when the execution service is still believed
to be available on that host.
- Parameters:
host
- The host on which the replica was running.
- Returns:
- True if recovery was successful; false otherwise.
relocateReplica
public boolean relocateReplica(Host host)
- Description copied from interface:
RecoveryStrategy
- Relocate the application replica that were running on the given
host. The new location should be obtain through the
DistributionScheme
provided by the replication
manager.
- Parameters:
host
- The host on which the replica were running.
- Returns:
- True if recovery was successful; false otherwise.
Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.