Class AgentReplicationHandle


  • public class AgentReplicationHandle
    extends Object
    Utility class the provides simplified access to the method-replication feature of the AgentReplicationService.
    • Constructor Detail

      • AgentReplicationHandle

        public AgentReplicationHandle()
    • Method Detail

      • replicate

        public static void replicate​(Agent a,
                                     String methodName,
                                     Object[] arguments)
        Utility method to be called at the beginning of each replicated method as exemplified below
        public void aReplicatedMethod(T1 a, T2 b) { AgentReplicationHandle.replicate(this, "aReplicatedMethod", new Object[]{a, b}); ... }
        Parameters:
        a - The agent providing the replicated method
        methodName - The name of the replicated method
        arguments - The arguments passed to the replicated method
      • isReplicatedCall

        public static boolean isReplicatedCall()
        Checks whether we are inside the execution of a replicated or original call.