|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
darx.TaskShell
class TaskShell
This is the wrapper that transparently performs FT-specific operations for
each task/agent.
The FT services provided here are :
Field Summary | |
---|---|
(package private) DarxTask |
task
The task/agent for which the current shell provides FT support. |
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
TaskShell(DarxTask task,
ReplicantInfo info)
Constructs a shell that provides transparent FT for a given task/agent. |
Method Summary | |
---|---|
(package private) boolean |
acceptMsg(DarxMessage msg)
Checks the validity of a received message. |
void |
deliverAsyncMessage(DarxMessage msg)
Sends an asynchronous message to the remote task. |
java.io.Serializable |
deliverSyncMessage(DarxMessage msg)
Sends a synchronous message to the remote task. |
void |
demoteFromGroupLeader()
Demotes this replicant from the status of leader to that of a simple replica within its group. |
ReplicantInfo |
getInfo()
|
ReplicationManager |
getReplicationManager()
|
ReplicationPolicy |
getReplicationPolicy()
|
DarxTask |
getTask()
|
void |
killReplicantAt(java.lang.String url,
int port_nb)
Deletes the replicant residing at the given location, provided it belongs to the replication group. |
void |
killTask()
Ends the generic task execution. |
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 |
replicateTo(java.lang.String url,
int port_nb,
ReplicationStrategy rs)
Creates a new replicant inside the replication group at a given location. |
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 |
switchReplicationStrategy(java.lang.String url,
int port_nb,
ReplicationStrategy rs)
Modifies the replication policy by applying a different strategy to a given replica. |
void |
terminate()
Terminates the execution of the encapsulated task. |
void |
terminateTask()
Terminates the task execution. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
DarxTask task
Constructor Detail |
---|
TaskShell(DarxTask task, ReplicantInfo info) throws java.rmi.RemoteException
DarxTask
.
task
- the task/agent to provide FT forname
- the complete DARX path name for this task;
it includes the location and the replicant numberstrategy
- the current replication group information
java.rmi.RemoteException
DarxTask
,
ReplicationStrategy
Method Detail |
---|
public ReplicantInfo getInfo() throws java.rmi.RemoteException
getInfo
in interface TaskShellHandle
java.rmi.RemoteException
public DarxTask getTask() throws java.rmi.RemoteException
getTask
in interface TaskShellHandle
java.rmi.RemoteException
public ReplicationPolicy getReplicationPolicy() throws java.rmi.RemoteException
getReplicationPolicy
in interface DarxHandle
getReplicationPolicy
in interface TaskShellHandle
java.rmi.RemoteException
ReplicationPolicy
public ReplicationManager getReplicationManager() throws java.rmi.RemoteException
java.rmi.RemoteException
ReplicationManager
public void setTask(DarxTask task) throws java.rmi.RemoteException
setTask
in interface TaskShellHandle
task
- the new task to encapsulate
java.rmi.RemoteException
DarxTask
,
PassiveReplicationStrategy.update()
public void setInfo(ReplicantInfo info) throws java.rmi.RemoteException
setInfo
in interface TaskShellHandle
info
- the info to set
java.rmi.RemoteException
ReplicantInfo
public void setPolicy(ReplicationPolicy rep_policy) throws java.rmi.RemoteException
setPolicy
in interface TaskShellHandle
rep_policy
- the info to set
java.rmi.RemoteException
ReplicationPolicy
public void setAsGroupLeader() throws java.rmi.RemoteException
setAsGroupLeader
in interface TaskShellHandle
java.rmi.RemoteException
ReplicationStrategy
public void demoteFromGroupLeader() throws java.rmi.RemoteException
demoteFromGroupLeader
in interface TaskShellHandle
java.rmi.RemoteException
ReplicationStrategy
public void switchReplicationStrategy(java.lang.String url, int port_nb, ReplicationStrategy rs) throws java.rmi.RemoteException, UnknownReplicantException
switchReplicationStrategy
in interface DarxHandle
url
- the url of the location which hosts the given replicaport_nb
- the port nb of the same locationrs
- the strategy to apply to the given replica
java.rmi.RemoteException
UnknownReplicantException
- if there is no replicant from the
group at the given locationReplicationStrategy
boolean acceptMsg(DarxMessage msg)
public void processDeliverAsyncMessage(DarxMessage msg) throws java.rmi.RemoteException
TaskShellHandle
processDeliverAsyncMessage
in interface TaskShellHandle
msg
- the message to be processed
java.rmi.RemoteException
DarxMessage
public java.io.Serializable processDeliverSyncMessage(DarxMessage msg) throws java.rmi.RemoteException
TaskShellHandle
processDeliverSyncMessage
in interface TaskShellHandle
msg
- the message to be processed
java.rmi.RemoteException
DarxMessage
public void deliverAsyncMessage(DarxMessage msg) throws java.rmi.RemoteException
DarxHandle
deliverAsyncMessage
in interface DarxHandle
msg
- the message destined to the remote task.
java.rmi.RemoteException
deliverAsyncMessage(DarxMessage msg)
public java.io.Serializable deliverSyncMessage(DarxMessage msg) throws java.rmi.RemoteException
DarxHandle
deliverSyncMessage
in interface DarxHandle
msg
- the message destined to the remote task.
java.rmi.RemoteException
deliverSyncMessage(DarxMessage msg)
public void replicateTo(java.lang.String url, int port_nb, ReplicationStrategy rs) throws java.rmi.RemoteException, IllegalReplicationException
replicateTo
in interface DarxHandle
url
- the location where the new replicant is to be createdport_nb
- the port corresponding to the serverrs
- the replication strategy applied to the new replicant
java.rmi.RemoteException
IllegalReplicationException
- if a replica of the same group
already exists at the locationDarxServer
,
ReplicationStrategy
public void killReplicantAt(java.lang.String url, int port_nb) throws java.rmi.RemoteException, UnknownReplicantException
killReplicantAt
in interface DarxHandle
url
- the location where the new replicant is to be createdport_nb
- the port corresponding to the server
java.rmi.RemoteException
UnknownReplicantException
- if there is no replicant from the
group at the given locationDarxServer
,
ReplicationStrategy
public void killTask() throws java.rmi.RemoteException
killTask
in interface DarxHandle
java.rmi.RemoteException
public void suspend() throws java.rmi.RemoteException
TaskShellHandle
suspend
in interface TaskShellHandle
java.rmi.RemoteException
public void resume() throws java.rmi.RemoteException
TaskShellHandle
resume
in interface TaskShellHandle
java.rmi.RemoteException
public void terminate() throws java.rmi.RemoteException
TaskShellHandle
terminate
in interface TaskShellHandle
java.rmi.RemoteException
public void terminateTask() throws java.rmi.RemoteException
terminateTask
in interface TaskShellHandle
java.rmi.RemoteException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |