darx
Interface TaskShellHandle

All Superinterfaces:
DarxHandle, java.rmi.Remote
All Known Implementing Classes:
TaskShell

interface TaskShellHandle
extends DarxHandle

This is the remote interface used within replication groups to access a distant TaskShell.
It is designed to be possessed and used by the replication group leaders for group maintenance purposes.

See Also:
TaskShell

Method Summary
 void demoteFromGroupLeader()
          Sets this replicant as a backup within its group.
 ReplicantInfo getInfo()
           
 ReplicationPolicy getReplicationPolicy()
           
 DarxTask getTask()
           
 void processDeliverAsyncMessage(DarxMessage msg)
          Starts the processing of an asynchronous message.
 java.io.Serializable processDeliverSyncMessage(DarxMessage msg)
          Starts the processing of a synchronous message.
 void resume()
          Resumes the local execution of the encapsulated task.
 void setAsGroupLeader()
          Sets this replicant as the leader of its group.
 void setInfo(ReplicantInfo info)
          Sets the information concerning the current TaskShell.
 void setPolicy(ReplicationPolicy rep_policy)
          Sets the information concerning the replication policy applied to the current TaskShell.
 void setTask(DarxTask task)
          Inserts a given task inside the current TaskShell.
 void suspend()
          Suspends the local execution of the encapsulated task.
 void terminate()
          Terminates the execution of the encapsulated task.
 void terminateTask()
          Terminates the execution of the encapsulated task.
 
Methods inherited from interface darx.DarxHandle
deliverAsyncMessage, deliverSyncMessage, killReplicantAt, killTask, replicateTo, switchReplicationStrategy
 

Method Detail

processDeliverAsyncMessage

void processDeliverAsyncMessage(DarxMessage msg)
                                throws java.rmi.RemoteException
Starts the processing of an asynchronous message.

Parameters:
msg - the message to be processed
Throws:
java.rmi.RemoteException
See Also:
DarxMessage

processDeliverSyncMessage

java.io.Serializable processDeliverSyncMessage(DarxMessage msg)
                                               throws java.rmi.RemoteException
Starts the processing of a synchronous message.

Parameters:
msg - the message to be processed
Returns:
the reply to the message
Throws:
java.rmi.RemoteException
See Also:
DarxMessage

getInfo

ReplicantInfo getInfo()
                      throws java.rmi.RemoteException
Returns:
the information concerning the present replicant
Throws:
java.rmi.RemoteException

getTask

DarxTask getTask()
                 throws java.rmi.RemoteException
Returns:
the encapsulated task
Throws:
java.rmi.RemoteException

getReplicationPolicy

ReplicationPolicy getReplicationPolicy()
                                       throws java.rmi.RemoteException
Specified by:
getReplicationPolicy in interface DarxHandle
Returns:
the replication policy of the local task
Throws:
java.rmi.RemoteException
See Also:
ReplicationPolicy

setTask

void setTask(DarxTask task)
             throws java.rmi.RemoteException
Inserts a given task inside the current TaskShell.

Parameters:
task - the new task to encapsulate
Throws:
java.rmi.RemoteException
See Also:
DarxTask, PassiveReplicationStrategy.update()

setInfo

void setInfo(ReplicantInfo info)
             throws java.rmi.RemoteException
Sets the information concerning the current TaskShell.

Parameters:
info - the info to set
Throws:
java.rmi.RemoteException
See Also:
ReplicantInfo

setPolicy

void setPolicy(ReplicationPolicy rep_policy)
               throws java.rmi.RemoteException
Sets the information concerning the replication policy applied to the current TaskShell.

Parameters:
rep_policy - the info to set
Throws:
java.rmi.RemoteException
See Also:
ReplicationPolicy

setAsGroupLeader

void setAsGroupLeader()
                      throws java.rmi.RemoteException
Sets this replicant as the leader of its group. This is an indirect way of modifying the ReplicationStrategy.

Throws:
java.rmi.RemoteException
See Also:
ReplicationStrategy

demoteFromGroupLeader

void demoteFromGroupLeader()
                           throws java.rmi.RemoteException
Sets this replicant as a backup within its group. This is an indirect way of modifying the ReplicationStrategy.

Throws:
java.rmi.RemoteException
See Also:
ReplicationStrategy

suspend

void suspend()
             throws java.rmi.RemoteException
Suspends the local execution of the encapsulated task. N.B: This does not involve suspending the local replication policy.

Throws:
java.rmi.RemoteException

resume

void resume()
            throws java.rmi.RemoteException
Resumes the local execution of the encapsulated task. N.B: This does not involve resuming the local replication policy.

Throws:
java.rmi.RemoteException

terminate

void terminate()
               throws java.rmi.RemoteException
Terminates the execution of the encapsulated task. This includes the removal of the global application information concerning the shell.

Throws:
java.rmi.RemoteException

terminateTask

void terminateTask()
                   throws java.rmi.RemoteException
Terminates the execution of the encapsulated task. This does not include the removal of the global application references to the encapsulation shell.

Throws:
java.rmi.RemoteException