|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jgroup.arm.ExecDaemon
public class ExecDaemon
ExecDaemon implements the ExecService allowing a replica manager or other entity to start replicas on hosts running the ExecDaemon. Note that an important property of ExecDaemon is that it does not have any state (except the map of local processes). Thus the rest of the distributed system does not depend on its state.
Field Summary |
---|
Fields inherited from interface jgroup.core.arm.ExecService |
---|
EXEC_DAEMON_NAME, SHUTDOWN_REPLICA |
Constructor Summary | |
---|---|
ExecDaemon()
|
Method Summary | |
---|---|
boolean |
createExecReplica(ClassData classData)
Comments inherited from jgroup.arm.ExecService |
boolean |
createReplica(ClassData classData)
Instantiate and start the given class (replica) in a JVM process separate from the execution service JVM process. |
static void |
main(java.lang.String[] argv)
|
void |
ping()
Method used to check if the execution service is still running. |
java.util.Set<ClassData> |
queryReplicas()
Return the set of replicas currently running on this execution service. |
boolean |
removeReplica(ClassData classData)
Remove the specified class (replica) from the execution service associated with the remote reference. |
void |
shutdown(int delay)
Request the execution service on this particular host to shutdown in approximately delay milliseconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecDaemon() throws java.rmi.RemoteException, JgroupException, ConfigurationException
java.rmi.RemoteException
JgroupException
ConfigurationException
Method Detail |
---|
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
public boolean createExecReplica(ClassData classData) throws java.rmi.RemoteException, ExecException
createExecReplica
in interface ExecService
classData
- The class data object representing the replica to start. The
specified class must implement the remove method.
java.rmi.RemoteException
- If remote operation failed.
ExecException
- If the specified class (replica) could not be instantiated or
if the class (replica) does not implement the remove method.public boolean createReplica(ClassData classData) throws java.rmi.RemoteException, ExecException
ClassData
object (or group) can be
started on each host. This makes the operation idempotent,
allowing several replication managers to invoke the same create
operation on the same host as another replication manager already
may have done. This prevents creating multiple instances of the
same class with identical arguments. Thus, different arguments
are not considered the same instance.
createReplica
in interface ExecService
classData
- The class data object representing the replica to start.
java.rmi.RemoteException
- If remote operation failed.
ExecException
- If the specified class (replica) could not be instantiated.public boolean removeReplica(ClassData classData) throws java.rmi.RemoteException
ExecService
removeReplica
in interface ExecService
classData
- The class data object representing the replica to start.
java.rmi.RemoteException
- If remote operation failed.public java.util.Set<ClassData> queryReplicas() throws java.rmi.RemoteException
ExecService
queryReplicas
in interface ExecService
ExecService
instance.
java.rmi.RemoteException
- If remote operation failed.ExecService.queryReplicas()
public void ping() throws java.rmi.RemoteException
ExecService
ping
in interface ExecService
java.rmi.RemoteException
- If remote operation failed. This will indicate that the execution
service is no longer running.ExecService.ping()
public void shutdown(int delay) throws java.rmi.RemoteException
ExecService
delay
milliseconds. If delay is negative
all local replicas are removed, and shutdown will be immediate and no
shutdown hooks are executed. If the delay is positive, shutdown hooks
will be executed during the shutdown sequence.
shutdown
in interface ExecService
delay
- The delay to wait before initiating shutdown.
java.rmi.RemoteException
- If remote operation failed. This will indicate that the execution
service is no longer running.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |