|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdarx.ReplicationStrategy
darx.PassiveReplicationStrategy
public class PassiveReplicationStrategy
This is the replication group manager specialisation which implements the passive replication strategy.
Field Summary |
---|
Fields inherited from class darx.ReplicationStrategy |
---|
ACTIVE_STRATEGY, BACKUP, EMPTY_STRATEGY, info, LEADER, PASSIVE_STRATEGY, QUORUM_STRATEGY, rep_number, replicants, role, type |
Constructor Summary | |
---|---|
PassiveReplicationStrategy(int ud)
Constructs a new instance of the passive replication strategy. |
Method Summary | |
---|---|
void |
activateUpdating(int ud)
Starts the backup process. |
int |
compareTo(ReplicationStrategy other_strat)
Compares this replication strategy to another. |
void |
deliverAsyncMessage(TaskShell shell,
DarxMessage msg)
Spreads the delivery of an asynchronous message throughout the replication group. |
java.io.Serializable |
deliverSyncMessage(TaskShell shell,
DarxMessage msg)
Spreads the delivery of a synchronous message throughout the replication group. |
int |
getUpdateDelay()
Returns the update delay. |
void |
resume()
Spreads the resumption of the encapsulated task execution throughout the replication group. |
void |
run()
Executes the backup mechanism. |
void |
setUpdateDelay(int ud)
Sets the update delay. |
void |
stop()
Stops the activity regarding consistency maintenance within the replication group (e.g. updater thread in the passive strategy.) |
void |
suspend()
Spreads the suspension of the encapsulated task execution throughout the replication group. |
void |
terminate()
Spreads the termination of the task execution throughout the replication group. |
protected void |
update()
Updates the replication group. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PassiveReplicationStrategy(int ud)
ud
- the delay between every backup.Method Detail |
---|
public int compareTo(ReplicationStrategy other_strat)
ReplicationStrategy
compareTo
in class ReplicationStrategy
other_strat
- the strategy to be compared
public int getUpdateDelay()
public void setUpdateDelay(int ud)
ud
- the new update delay.protected void update()
DarxTask
to replace
the one held in the TaskShell
of the backups.
public void activateUpdating(int ud)
ud
- the update delay.resume()
public void suspend()
ReplicationStrategy
suspend
in class ReplicationStrategy
public void resume()
ReplicationStrategy
resume
in class ReplicationStrategy
public void run()
run
in interface java.lang.Runnable
public void stop()
ReplicationStrategy
stop
in class ReplicationStrategy
public void terminate() throws java.rmi.RemoteException
ReplicationStrategy
terminate
in class ReplicationStrategy
java.rmi.RemoteException
public void deliverAsyncMessage(TaskShell shell, DarxMessage msg)
ReplicationStrategy
deliverAsyncMessage
in class ReplicationStrategy
shell
- the shell corresponding to the present strategy
(used to process the message locally)msg
- the message to deliverpublic java.io.Serializable deliverSyncMessage(TaskShell shell, DarxMessage msg)
ReplicationStrategy
deliverSyncMessage
in class ReplicationStrategy
shell
- the shell corresponding to the present strategy
(used to process the message locally)msg
- the message to deliver
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |