|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdarx.RemoteTask
public class RemoteTask
This is the local proxy that allows user application tasks to handle other tasks. This class defines the core services Darx provides to user applications for handling the different tasks (or agents) of the distributed system. It includes replication management and message sending. At length, the replication management scheme should become transparent to the user, and therefore might disappear from the current services provided herein.
Constructor Summary | |
---|---|
RemoteTask(ReplicantInfo new_leader_info)
Constructs a user-sufficient definition of a remote task. |
|
RemoteTask(ReplicantInfo new_leader_info,
DarxHandle handle)
Constructs a user-sufficient definition of a remote task. |
Method Summary | |
---|---|
ReplicationPolicy |
getReplicationPolicy()
Get the current replication policy of the remote task |
void |
killReplicantAt(java.lang.String url)
Starts the mechanism to destroy a specific replica of the remote task on a given server. |
void |
killReplicantAt(java.lang.String url,
int port_nb)
Starts the mechanism to destroy a specific replica of the remote task on a given server. |
void |
killTask()
Terminates the execution of this replication group. |
void |
replicateTo(java.lang.String url)
Starts the mechanism to create a new replica of the remote task at a specified URL. |
void |
replicateTo(java.lang.String url,
int port_nb)
Starts the mechanism to create a new replica of the remote task on a specified server. |
void |
replicateTo(java.lang.String url,
int port_nb,
ReplicationStrategy rs)
Starts the mechanism to create a new replica of the remote task on a specified server following a given replication strategy. |
(package private) void |
sendAsyncMessage(DarxMessage msg)
Sends a message asynchronously to the remote task, that is to the leader of the corresponding replication group. |
(package private) java.lang.Object |
sendSyncMessage(DarxMessage msg)
Sends a message synchronously to the remote task, that is to the leader of the corresponding replication group. |
void |
setLeaderAt(java.lang.String url,
int port_nb)
Sets the replica at the given location as the new leader for its group. |
(package private) void |
setLeaderInfo(ReplicantInfo new_leader_info)
Sets the information concerning the leader of the remote task. |
void |
switchReplicationStrategy(java.lang.String url,
int port_nb,
ReplicationStrategy strategy)
Modifies the current replication policy of the group, by applying a new strategy to a given replica. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
RemoteTask(ReplicantInfo new_leader_info, DarxHandle handle)
new_leader_info
- the information concerning the leader of the
task which this instance references.handle
- the interface to access the leader in charge of
this task.DarxHandle
,
TaskShell
RemoteTask(ReplicantInfo new_leader_info) throws java.rmi.RemoteException
new_leader_info
- the information concerning the leader of the
task which this instance references.
java.rmi.RemoteException
DarxHandle
,
TaskShell
Method Detail |
---|
void setLeaderInfo(ReplicantInfo new_leader_info) throws java.rmi.RemoteException
new_leader_info
- the information concerning the current leader.
java.rmi.RemoteException
void sendAsyncMessage(DarxMessage msg)
NameServer
and
the whole emission procedure is restarted.
msg
- the contents of the emission.DarxHandle.deliverAsyncMessage(DarxMessage msg)
java.lang.Object sendSyncMessage(DarxMessage msg)
msg
- the contents of the emission.DarxHandle.deliverSyncMessage(DarxMessage msg)
public void replicateTo(java.lang.String url) throws java.rmi.RemoteException
url
- the URL of the remote DARX server where the new replica is
created
java.rmi.RemoteException
DarxHandle
,
Darx.createReplicant(darx.ReplicantInfo, darx.DarxTask)
,
TaskShell.replicateTo(java.lang.String, int, darx.ReplicationStrategy)
public void replicateTo(java.lang.String url, int port_nb) throws java.rmi.RemoteException
url
- the URL of the remote DARX server where the new replica
is createdport_nb
- the port number of the remote DARX server where the new
replica is created
java.rmi.RemoteException
DarxHandle
,
Darx.createReplicant(darx.ReplicantInfo, darx.DarxTask)
,
TaskShell.replicateTo(java.lang.String, int, darx.ReplicationStrategy)
public void replicateTo(java.lang.String url, int port_nb, ReplicationStrategy rs) throws java.rmi.RemoteException, IllegalReplicationException
url
- the URL of the remote DARX server where the new replica
is createdport_nb
- the port number of the remote DARX server where the new
replica is createdrs
- the replication strategy applied to the new replica
java.rmi.RemoteException
IllegalReplicationException
DarxHandle
,
Darx.createReplicant(darx.ReplicantInfo, darx.DarxTask)
,
TaskShell.replicateTo(java.lang.String, int, darx.ReplicationStrategy)
public void killReplicantAt(java.lang.String url) throws java.rmi.RemoteException, UnknownReplicantException
url
- the URL of the remote DARX server hosting the doomed replica
java.rmi.RemoteException
UnknownReplicantException
DarxHandle
public void killReplicantAt(java.lang.String url, int port_nb) throws java.rmi.RemoteException, UnknownReplicantException
url
- the URL of the remote DARX server supporting
the doomed replicaport_nb
- the port number of the same remote DARX server
java.rmi.RemoteException
UnknownReplicantException
DarxHandle
public void killTask() throws java.rmi.RemoteException
java.rmi.RemoteException
public void switchReplicationStrategy(java.lang.String url, int port_nb, ReplicationStrategy strategy) throws java.rmi.RemoteException
url
- the URL of the replica to which the new strategy appliesport_nb
- the port number of the replica to which the new strategy
appliesstrategy
- the new strategy to be applied
java.rmi.RemoteException
DarxHandle
,
ReplicationStrategy
,
TaskShell.switchReplicationStrategy(java.lang.String, int, darx.ReplicationStrategy)
public ReplicationPolicy getReplicationPolicy() throws java.rmi.RemoteException
java.rmi.RemoteException
ReplicationPolicy
public void setLeaderAt(java.lang.String url, int port_nb) throws java.rmi.RemoteException
url
- the url of the server hosting the new leaderport_nb
- the port nb of the server hosting the new leader
java.rmi.RemoteException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |