Class LogicModuleMetadataMgr

    • Field Detail

      • DEBUG_ENABLED

        protected static final boolean DEBUG_ENABLED
        Indicates if debug is enabled.
    • Constructor Detail

      • LogicModuleMetadataMgr

        public LogicModuleMetadataMgr​(SQLiteDataSource dataSource)
        Instantiates an MetaDataService that uses the Backend configuration provided.
        Parameters:
        dataSource - Data source.
    • Method Detail

      • unregisterStorageLocation

        public void unregisterStorageLocation​(StorageLocationID stLocID)
        Unregisters a storage location
        Parameters:
        stLocID - id of the storage location to be unregistered
      • updateStorageLocation

        public void updateStorageLocation​(StorageLocationID stLocID,
                                          String newhost,
                                          Integer newport)
        Updates host and port of a storage location
        Parameters:
        stLocID - id of the storage location to be updated
        newhost - New host
        newport - New port
      • updateExecutionEnvironment

        public void updateExecutionEnvironment​(ExecutionEnvironmentID eeID,
                                               String newhost,
                                               Integer newport)
        Updates host and port of a execution environment
        Parameters:
        eeID - id of the execution environment to be updated
        newhost - New host
        newport - New port
      • unregisterExecutionEnvironment

        public void unregisterExecutionEnvironment​(ExecutionEnvironmentID execEnvID)
        Unregisters an execution environment
        Parameters:
        execEnvID - id of the storage location to be unregistered
      • getStorageLocationID

        public StorageLocationID getStorageLocationID​(String stLocName)
        This operation queries a Storage Location by its name
        Parameters:
        stLocName - Name of the Storage Location to get
        Returns:
        The ID of the queried Storage Location
        Throws:
        Exception - if an exception occurs:
        StorageLocationNotExistException: if a storage location with the given name does not exist
      • getStorageLocationInfo

        public StorageLocation getStorageLocationInfo​(StorageLocationID storageLocationID)
        This operation retrieves the info of a storage location
        Parameters:
        storageLocationID - ID of the storage location
        Returns:
        the info of the storage location
        Throws:
        Exception - if an exception occurs:
        StorageLocationNotExistException: if the storage location does not exist
      • getAllStorageLocationsInfo

        public Map<StorageLocationID,​StorageLocation> getAllStorageLocationsInfo()
        This operation retrieves the info of all the current registered storage locations.
        Returns:
        info of the registered storage locations indexed by their IDs
      • getExecutionEnvironmentInfo

        public ExecutionEnvironment getExecutionEnvironmentInfo​(ExecutionEnvironmentID execEnvID)
        This operation retrieves the info of an execution environment
        Parameters:
        execEnvID - ID of the execution environment to get its info
        Returns:
        the info of the backend
        Throws:
        Exception - if an exception occurs:
        ExecutionEnvironmentNotExistException: if backend does not exist
      • getAllExecutionEnvironmentsInfo

        public Map<ExecutionEnvironmentID,​ExecutionEnvironment> getAllExecutionEnvironmentsInfo​(CommonMessages.Langs execEnvLang)
        This operation retrieves the info of all the current registered execution environments.
        Parameters:
        execEnvLang - language
        Returns:
        info of the registered execution environments indexed by their IDs
      • registerExternalDataclay

        public void registerExternalDataclay​(DataClayInstance dataClay)
        Register external dataclay
        Parameters:
        dataClay - instance to register
      • unregisterExternalDataClayAddress

        public void unregisterExternalDataClayAddress​(String host,
                                                      Integer port)
        Unregister external dataClay address
        Parameters:
        host - Host
        port - Port
      • getAllExternalDataClays

        public Set<DataClayInstanceID> getAllExternalDataClays()
        Get all dataClays current dataClay has objects federated with
        Returns:
        dataClay IDs current dataClay has objects federated with
      • registerLogicModule

        public void registerLogicModule​(LogicMetadataIDs logicmoduleIDs)
        Store into database
        Parameters:
        logicmoduleIDs - logic module ids
      • existsMetaData

        public boolean existsMetaData()
        Check if there is a LogicModule
        Returns:
        TRUE if exists. FALSE otherwise
      • getLogicMetadata

        public LogicMetadataIDs getLogicMetadata()
        Get LogicModule metadata by ID
        Returns:
        The LogicModule metadata
      • closeDbHandler

        public void closeDbHandler()
        Close DbHandler