Class FederatedLookupTable


  • public class FederatedLookupTable
    extends Object
    Lookup table mapping from a FedUniqueCoordID (funCID) to an ExecutionContextMap (ECM) so that every coordinator can address federated variables with its own local sequential variable IDs. Therefore, the IDs among different coordinators do not have to be distinct, as every coordinator works with a separate ECM at the FederatedWorker.
    • Constructor Detail

      • FederatedLookupTable

        public FederatedLookupTable()
    • Method Detail

      • getECM

        public ExecutionContextMap getECM​(String host,
                                          long pid)
        Get the ExecutionContextMap corresponding to the given host and pid of the requesting coordinator from the lookup table. Create a new ExecutionContextMap if there is no corresponding entry in the lookup table.
        Parameters:
        host - the host string of the requesting coordinator (usually IP address)
        pid - the process id of the requesting coordinator
        Returns:
        ExecutionContextMap the ECM corresponding to the requesting coordinator
      • removeECM

        public void removeECM​(String host,
                              long pid)
        Remove the ExecutionContextMap corresponding to the given host and pid of the requesting coordinator from the lookup table. Do nothing if no entry is associated to the host and pid.
        Parameters:
        host - the host string of the requesting coordinator (usually IP address)
        pid - the process id of the requesting coordinator
      • containsFunCID

        public boolean containsFunCID​(String host,
                                      long pid)
        Check if there is a mapped ExecutionContextMap for the coordinator with the given host and pid.
        Parameters:
        host - the host string of the requesting coordinator (usually IP address)
        pid - the process id of the requesting coordinator
        Returns:
        boolean true if there is a lookup table entry, otherwise false