Interface LogicModuleAPI

  • All Known Implementing Classes:
    LogicModule, LogicModuleGrpcClient

    public interface LogicModuleAPI
    This interface define the methods of the Logic Module that can be executed remotely.
    • Method Detail

      • autoregisterSL

        void autoregisterSL​(StorageLocationID id,
                            String dsName,
                            String dsHostname,
                            Integer dsPort)
        Register storage location
        Parameters:
        id - ID of the storage location to register
        dsName - Name
        dsHostname - Hostname
        dsPort - Port
      • getStorageLocationID

        StorageLocationID getStorageLocationID​(String slName)
        Get ID of storage location with name provided
        Parameters:
        slName - Storage Location name
        Returns:
        ID of the storage location
      • unregisterStorageLocation

        void unregisterStorageLocation​(StorageLocationID stLocID)
        Unregister storage location with ID provided
        Parameters:
        stLocID - ID storage location to unregister
      • unregisterExecutionEnvironment

        void unregisterExecutionEnvironment​(ExecutionEnvironmentID execEnvID)
        Unregister execution environment with ID provided
        Parameters:
        execEnvID - ID of execution environment to unregister
      • notifyExecutionEnvironmentShutdown

        void notifyExecutionEnvironmentShutdown​(ExecutionEnvironmentID execEnvID)
        Notify that Execution Environment with ID provided has been shut down.
        Parameters:
        execEnvID - ID of the execution environment shutted down.
      • notifyStorageLocationShutdown

        void notifyStorageLocationShutdown​(StorageLocationID stLocID)
        Notify that Storage Location with ID provided has been shut down.
        Parameters:
        stLocID - ID of the storage location shutted down.
      • existsActiveEnvironmentsForSL

        boolean existsActiveEnvironmentsForSL​(StorageLocationID stLocID)
        Check if there is an active Execution Environment associated to SL with ID provided.
        Parameters:
        stLocID - ID of the storage location to check
        Returns:
        TRUE if there is an active Execution Environment associated to SL with ID provided. FALSE, otherwise.
      • checkAlive

        void checkAlive()
        Check logic module is alive.
      • publishAddress

        void publishAddress​(String hostname,
                            int port)
        Configure LogicModule to give provided address in case external dataClays require to know how to access current dataClay
        Parameters:
        hostname - Hostname to be published (given to external dataClays)
        port - Port to be published
      • performSetOfNewAccounts

        byte[] performSetOfNewAccounts​(AccountID adminID,
                                       PasswordCredential adminCredential,
                                       byte[] yamlFile)
        Perform a series of new account creations, described by a YAML parameter.
        Parameters:
        adminID - ID of the account of the user that desires to perform the operations.
        adminCredential - Credential of the admin's account.
        yamlFile - A YAML file containing all the new users.
        Returns:
        A YAML file with the ID for the created users.
      • performSetOfOperations

        byte[] performSetOfOperations​(AccountID performerID,
                                      PasswordCredential performerCredential,
                                      byte[] yamlFile)
        Perform a series of operations, described by a YAML parameter.
        Parameters:
        performerID - ID of the account of the user that desires to perform the operations.
        performerCredential - Credential of the performer's account.
        yamlFile - A YAML file containing all the operations.
        Returns:
        A YAML file with the result for all the operations.
      • newAccountNoAdmin

        AccountID newAccountNoAdmin​(Account newAccount)
        This operation creates a new account in the system without admin credentials.
        Parameters:
        newAccount - Specifications of the account to create
        Returns:
        AccountID of the new account if the it was successfully created.
      • newAccount

        AccountID newAccount​(AccountID adminAccountID,
                             PasswordCredential adminCredential,
                             Account newAccount)
        This operation creates a new account in the system with the provided username.
        Parameters:
        adminAccountID - ID of the account of the user that calls the operation
        adminCredential - Credential of the adminAccount provided
        newAccount - Specifications of the account to create
        Returns:
        AccountID of the new account if the it was successfully created.
      • getAccountID

        AccountID getAccountID​(String accountName)
        Method that retrieves the id of an account given its name
        Parameters:
        accountName - the user name of the account
        Returns:
        the account id if the operation succeeds. null otherwise.
      • getAccountList

        Set<AccountID> getAccountList​(AccountID adminAccountID,
                                      PasswordCredential adminCredential)
        The list of users registered in the system
        Parameters:
        adminAccountID - ID of the account of the user that calls the operation
        adminCredential - Credential of the adminAccount provided
        Returns:
        the IDs of the users registered in the system.
      • newSession

        SessionInfo newSession​(AccountID accountID,
                               PasswordCredential credential,
                               Set<ContractID> contracts,
                               Set<DataSetID> dataSetIDs,
                               DataSetID dataSetForStore,
                               CommonMessages.Langs newsessionLang)
        Method that registeres a new session for the given account considering the provided interfaces in contract
        Parameters:
        accountID - ID of the account
        credential - credentials for the account
        contracts - contracts to be considered
        dataSetIDs - Accessible datasets for the session (user must have one data contract for each dataset)
        dataSetForStore - Dataset for store (dataset must be include among the dataSets)
        newsessionLang - language for the sesssion
        Returns:
        Information of the new session
      • closeSession

        void closeSession​(SessionID sessionID)
        Close session.
        Parameters:
        sessionID - ID of session to close.
      • getInfoOfSessionForDS

        Tuple<Tuple<DataSetID,​Set<DataSetID>>,​Calendar> getInfoOfSessionForDS​(SessionID sessionID)
        Checks provided session and returns visible datasets
        Parameters:
        sessionID - ID of the session
        Returns:
        Visible datasets from this session.
      • newNamespace

        NamespaceID newNamespace​(AccountID accountID,
                                 PasswordCredential credential,
                                 Namespace newNamespace)
        Method that creates a new namespace in the system.
        Parameters:
        accountID - the account id of the account
        credential - the credential of the account
        newNamespace - Specifications of the new namespace
        Returns:
        the id of the new namespace
      • removeNamespace

        void removeNamespace​(AccountID accountID,
                             PasswordCredential credential,
                             String namespaceName)
        This method removes a namespace from the system by checking it has no active contract associated with it, and no classes registered on it.
        Parameters:
        accountID - the account id either of the responsible of the namespace or the the admin account
        credential - the credential of the account
        namespaceName - the name of the namespace
      • getNamespaceID

        NamespaceID getNamespaceID​(AccountID accountID,
                                   PasswordCredential credential,
                                   String namespaceName)
        Retrieves the id of a namespace identified by name provided
        Parameters:
        accountID - Requester account id
        credential - Requester credential
        namespaceName - Name of the namespace
        Returns:
        ID of the namespace or NULL if an error happened.
      • getNamespaces

        Set<String> getNamespaces​(AccountID accountID,
                                  PasswordCredential credential)
        Retrieves the names of the available namespaces
        Parameters:
        accountID - Requester account id
        credential - Requester credential
        Returns:
        set of namespaces names
      • getNamespaceLang

        CommonMessages.Langs getNamespaceLang​(AccountID accountID,
                                              PasswordCredential credential,
                                              String namespaceName)
        Retrieves the language of a namespace identified by name provided
        Parameters:
        accountID - Requester account id
        credential - Requester credential
        namespaceName - Name of the namespace
        Returns:
        Language of the namespace or NULL if an error happened.
      • getObjectDataSetID

        DataSetID getObjectDataSetID​(SessionID sessionID,
                                     ObjectID oid)
        Retrieves the id of a dataset of the object with ID provided.
        Parameters:
        sessionID - ID of session
        oid - Object ID
        Returns:
        ID of the dataset or NULL if an error happened.
        Throws:
        Exception - if an exception occurs.
      • importInterface

        void importInterface​(AccountID accountID,
                             PasswordCredential credential,
                             NamespaceID namespaceID,
                             ContractID contractID,
                             InterfaceID interfaceID)
        Imports an interface in contract into a specific namespace
        Parameters:
        accountID - the account that performs the action
        credential - credentials of the account
        namespaceID - ID of namespace where interface in contract is imported
        contractID - ID of the contract
        interfaceID - ID of the interface
      • importContract

        void importContract​(AccountID accountID,
                            PasswordCredential credential,
                            NamespaceID namespaceID,
                            ContractID contractID)
        Imports the interfaces of the contract into a specific namespace
        Parameters:
        accountID - the account that performs the action
        credential - credentials of the account
        namespaceID - ID of namespace where interface in contract is imported
        contractID - ID of the contract
      • newDataSet

        DataSetID newDataSet​(AccountID accountID,
                             PasswordCredential credential,
                             DataSet dataset)
        Method that creates a new dataset in the system.
        Parameters:
        accountID - the account id of the account
        credential - the credential of the account
        dataset - Specifications of the dataset to create
        Returns:
        the id of the new dataset
      • removeDataSet

        void removeDataSet​(AccountID accountID,
                           PasswordCredential credential,
                           String datasetName)
        This method removes a dataset from the system by checking it has no active data contract associated with it and no objects registered in it.
        Parameters:
        accountID - the account id either of the responsible of the dataset or the the admin account
        credential - the credential of the account
        datasetName - the name of the dataset
      • getDataSetID

        DataSetID getDataSetID​(AccountID accountID,
                               PasswordCredential credential,
                               String datasetName)
        Retrieves the id of a dataset identified by name provided
        Parameters:
        accountID - ID of the account responsible of the given dataset
        credential - Credential of the account
        datasetName - Name of the dataset
        Returns:
        ID of the namespace or NULL if an error happened.
      • checkDataSetIsPublic

        boolean checkDataSetIsPublic​(DataSetID dataSetID)
        Checks whether the dataset is public or not
        Parameters:
        dataSetID - ID of the dataset to be chcecked
        Returns:
        true if the dataset is public, false otherwise.
      • getPublicDataSets

        Set<String> getPublicDataSets​(AccountID accountID,
                                      PasswordCredential credential)
        Retrieves the publicly available datasets
        Parameters:
        accountID - ID of the account
        credential - Credential of the account
        Returns:
        set of public dataset names
      • getAccountDataSets

        Set<String> getAccountDataSets​(AccountID accountID,
                                       PasswordCredential credential)
        Retrieves the datasets provided by the given account
        Parameters:
        accountID - ID of the account
        credential - Credential of the account
        Returns:
        set of names of account's datasets
      • newClass

        Map<String,​MetaClass> newClass​(AccountID accountID,
                                             PasswordCredential credential,
                                             CommonMessages.Langs language,
                                             Map<String,​MetaClass> newClasses)
        This operation creates a new metaclass in the system with the provided specifications and associate it to the Namespace provided.
        Parameters:
        accountID - ID of the account of the user that calls the operation
        credential - Credential of the account provided
        language - Language of the classes provided
        newClasses - Specifications of classes to create
        Returns:
        info of the new MetaClass if it was successfully created.
      • removeClass

        void removeClass​(AccountID accountID,
                         PasswordCredential credential,
                         NamespaceID namespaceID,
                         String className)
        Method that removes a class given its name and the name of the namespace where it belongs to
        Parameters:
        accountID - ID of the account responsible of the namespace of the class
        credential - Credential of the account responsible of the namespace of the class
        namespaceID - ID of the namespace of the class to remove
        className - Name of the class to remove
      • removeOperation

        void removeOperation​(AccountID accountID,
                             PasswordCredential credential,
                             NamespaceID namespaceID,
                             String className,
                             String operationSignature)
        Method that removes an operation given its signature
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the ID of the namespace of the class of the operation
        className - the name of the class of the opreation
        operationSignature - the signature of the operation
      • removeImplementation

        void removeImplementation​(AccountID accountID,
                                  PasswordCredential credential,
                                  NamespaceID namespaceID,
                                  ImplementationID implementationID)
        Method that removes an implementation of a certain operation
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - ID of the namespace of the implementation
        implementationID - the id of the implementation
      • getOperationID

        OperationID getOperationID​(AccountID accountID,
                                   PasswordCredential credential,
                                   NamespaceID namespaceID,
                                   String className,
                                   String operationSignature)
        Method that retrieves the id of an operation given its signature
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the id of the namespace
        className - the name of the class
        operationSignature - signature of the operation
        Returns:
        the operation id if the operation succeeds. null otherwise.
      • getPropertyID

        PropertyID getPropertyID​(AccountID accountID,
                                 PasswordCredential credential,
                                 NamespaceID namespaceID,
                                 String className,
                                 String propertyName)
        Method that retrieves the id of a property given its signature
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the id of the namespace
        className - the name of the class
        propertyName - the name of the property
        Returns:
        the property id if the operation succeeds. null otherwise.
      • getClassID

        MetaClassID getClassID​(AccountID accountID,
                               PasswordCredential credential,
                               NamespaceID namespaceID,
                               String className)
        Method that retrieves the id of a class given its name
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the id of the namespace
        className - the name of the class
        Returns:
        the class id if the operation succeeds. null otherwise.
      • getClassInfo

        MetaClass getClassInfo​(AccountID accountID,
                               PasswordCredential credential,
                               NamespaceID namespaceID,
                               String className)
        Method that retrieves the id of a class given its name
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the id of the namespace
        className - the name of the class
        Returns:
        the class id if the operation succeeds. null otherwise.
      • getInfoOfClassesInNamespace

        Map<MetaClassID,​MetaClass> getInfoOfClassesInNamespace​(AccountID accountID,
                                                                     PasswordCredential credential,
                                                                     NamespaceID namespaceID)
        Method that retrieves the info of the classes registered in specific namespace.
        Parameters:
        accountID - the account of the responsible of the namespace
        credential - the credentials of the account
        namespaceID - the id of the namespace
        Returns:
        The info of the classes registered in the given namespace if the operation succeeds. null otherwise.
      • newContract

        ContractID newContract​(AccountID accountID,
                               PasswordCredential credential,
                               Contract newContract)
        Method to register a new contract.
        Parameters:
        accountID - The account of the contract provider
        credential - Credential of the account
        newContract - the specification of the contract (dates, interfaces, etc.)
        Returns:
        the contract id if the operation succeeds. null otherwise.
      • registerToPublicContract

        void registerToPublicContract​(AccountID accountID,
                                      PasswordCredential credential,
                                      ContractID contractID)
        Method to register an account to a contract
        Parameters:
        accountID - The account of the applicant for the contract
        credential - The credential of the applicant for the contract
        contractID - ID of the contract in which to register.
      • registerToPublicContractOfNamespace

        ContractID registerToPublicContractOfNamespace​(AccountID accountID,
                                                       PasswordCredential credential,
                                                       NamespaceID namespaceID)
        Method to register an account to a public contract given a namespace
        Parameters:
        accountID - The account of the applicant for the contract
        credential - The credential of the applicant for the contract
        namespaceID - ID of the namespace in which to register (in case it provides a public contract)
        Returns:
        ID of the public contract associated with the namespace
      • getContractIDsOfApplicant

        Map<ContractID,​Contract> getContractIDsOfApplicant​(AccountID applicantAccountID,
                                                                 PasswordCredential credential)
        Method that returns all contract IDs of a user (as applicant).
        Parameters:
        applicantAccountID - Account ID of the user that queries for its contract IDs
        credential - Credential of the account
        Returns:
        A list of Contract IDs of the account provided.
      • getContractIDsOfProvider

        Map<ContractID,​Contract> getContractIDsOfProvider​(AccountID accountID,
                                                                PasswordCredential credential,
                                                                NamespaceID namespaceIDofProvider)
        Method that returns all contract IDs of a namespace (as provider).
        Parameters:
        accountID - ID of the responsible of the namespace.
        credential - credentails of the responsible of the namespace.
        namespaceIDofProvider - ID of the namespace provider
        Returns:
        A list of Contract IDs of the namespace as provider.
      • getContractIDsOfApplicantWithProvider

        Map<ContractID,​Contract> getContractIDsOfApplicantWithProvider​(AccountID applicantAccountID,
                                                                             PasswordCredential credential,
                                                                             NamespaceID namespaceIDofProvider)
        Method that returns all contract IDs of a user (as applicant) with the given namespace provider.
        Parameters:
        applicantAccountID - Account ID of the user that queries for its contract IDs.
        credential - Credential of the account.
        namespaceIDofProvider - ID of the namespace that provides the contracts to be retrieved.
        Returns:
        A list of Contract IDs of the specified account with the given namespace provider.
      • newDataContract

        DataContractID newDataContract​(AccountID accountID,
                                       PasswordCredential credential,
                                       DataContract newDataContract)
        Creates a new Data Contract
        Parameters:
        accountID - ID of the responsible of the dataset
        credential - credential of the account responsible of dataset
        newDataContract - specifications of the datacontract to create
        Returns:
        The id of the new contract if it success, error otherwise.
      • registerToPublicDataContract

        void registerToPublicDataContract​(AccountID accountID,
                                          PasswordCredential credential,
                                          DataContractID datacontractID)
        Method that registers a certain account to a public data contract.
        Parameters:
        accountID - ID of the account that wants to be registered to the contract
        credential - the credential of the acount
        datacontractID - the ID of the public data contract
      • getDataContractIDsOfProvider

        Map<DataContractID,​DataContract> getDataContractIDsOfProvider​(AccountID accountID,
                                                                            PasswordCredential credential,
                                                                            DataSetID datasetIDofProvider)
        Method that retrieves the data contracts that a dataset provides.
        Parameters:
        accountID - ID of a responsible of the data contract (or admin)
        credential - credential of the account
        datasetIDofProvider - ID of the dataset providing the contracts
        Returns:
        The set of data contracts provided by the dataset.
      • getDataContractIDsOfApplicant

        Map<DataContractID,​DataContract> getDataContractIDsOfApplicant​(AccountID applicantAccountID,
                                                                             PasswordCredential credential)
        Method that retrieves the data contracts that an account has (as applicant).
        Parameters:
        applicantAccountID - ID of the account to be checked
        credential - credential of the account
        Returns:
        The set of data contracts that the account has applied to.
      • getDataContractInfoOfApplicantWithProvider

        DataContract getDataContractInfoOfApplicantWithProvider​(AccountID applicantAccountID,
                                                                PasswordCredential credential,
                                                                DataSetID datasetIDofProvider)
        Method that retrieves the data contract of an account (as applicant) with a certain dataset.
        Parameters:
        applicantAccountID - ID of the account to be checked.
        credential - credential of the account
        datasetIDofProvider - ID of the dataset as provider
        Returns:
        the data contract the account has applied to with the given dataset
      • newInterface

        InterfaceID newInterface​(AccountID accountID,
                                 PasswordCredential credential,
                                 Interface newInterface)
        Method that registers a new interface
        Parameters:
        accountID - the account of the responsible of the namespace of the class
        credential - the credentials of the account
        newInterface - specifications of interface to create
        Returns:
        ID of the new interface created or NULL if it failed.
      • getInterfaceInfo

        Interface getInterfaceInfo​(AccountID accountID,
                                   PasswordCredential credential,
                                   InterfaceID interfaceID)
        Method that retrieves the info of the interface if the account is registered in a contract that contains it
        Parameters:
        accountID - ID of the account registered in a contract with the interface present
        credential - the credential of the account
        interfaceID - the ID of the interface to be retrieved
        Returns:
        info of the interface
      • removeInterface

        void removeInterface​(AccountID accountID,
                             PasswordCredential credential,
                             NamespaceID namespaceID,
                             InterfaceID interfaceID)
        Method that removes a specific interface
        Parameters:
        accountID - the account of the responsible of the namespace of the interface
        credential - the credentials of the acount
        namespaceID - ID of the namespace of the interface
        interfaceID - the id of the interface to be removed
      • registerObjectFromGC

        void registerObjectFromGC​(RegistrationInfo regInfo,
                                  ExecutionEnvironmentID backendID,
                                  DataServiceRuntime clientLib)
        Register objects in MDS
        Parameters:
        regInfo - Registration info
        backendID - ID of the backend in which the objects were stored
        clientLib - DataService objects Map to be modified since this call is ASYNCHRONOUS. Thus, modified by GRPC (see Logic module grpc client)
      • getAllExecutionEnvironmentsInfo

        Map<ExecutionEnvironmentID,​ExecutionEnvironment> getAllExecutionEnvironmentsInfo​(CommonMessages.Langs exeEnvLang,
                                                                                               boolean getExternal,
                                                                                               boolean fromBackend)
        Method that retrieves the info of all the registered backends
        Parameters:
        exeEnvLang - Language of execution environments to get information of
        getExternal - Indicates if external execution environments must be also obtained
        fromBackend - Indicates request was done from backend (dsjava, dspython) i.e. do not use exposed IP.
        Returns:
        the info of the registered Storage Locations in a table indexed by their IDs
      • getStorageLocationInfo

        StorageLocation getStorageLocationInfo​(StorageLocationID backendID,
                                               boolean fromBackend)
        Retrieves the backend specification
        Parameters:
        backendID - ID of the backend
        fromBackend - Indicates request was done from backend (dsjava, dspython) i.e. do not use exposed IP.
        Returns:
        the specification of the backend
      • getExecutionEnvironmentInfo

        ExecutionEnvironment getExecutionEnvironmentInfo​(ExecutionEnvironmentID backendID,
                                                         boolean fromBackend)
        Retrieves the backend specification
        Parameters:
        backendID - ID of the backend
        fromBackend - Indicates request was done from backend (dsjava, dspython) i.e. do not use exposed IP.
        Returns:
        the specification of the backend
      • registerExternalDataClay

        DataClayInstanceID registerExternalDataClay​(String hostname,
                                                    int port)
        Method that tries to register an external instance of dataClay assigning a new ID to it. If if is already registered, method is ignored.
        Parameters:
        hostname - host name of the main service of the external dataClay instance.
        port - port of the external main service of the dataClay instance
        Returns:
        ID of dataClay registered.
      • registerExternalDataClayOverrideAuthority

        DataClayInstanceID registerExternalDataClayOverrideAuthority​(AccountID adminAccountID,
                                                                     PasswordCredential adminCredential,
                                                                     String hostname,
                                                                     int port,
                                                                     String authority)
        For system-admin users only. Method that registers an external dataclay overriding authority specified.
        Parameters:
        adminAccountID - Admin account iD
        adminCredential - Admin credentials
        hostname - Hostname
        port - Port
        authority - Authority
        Returns:
        ID of the dataClay registered
      • notifyRegistrationOfExternalDataClay

        DataClayInstanceID notifyRegistrationOfExternalDataClay​(DataClayInstanceID dataClayInstanceID,
                                                                String hostname,
                                                                int port)
        When you register an external DataClay, we notify external dataClay about the registration and we get the ID of the external dataClay. Destination dataClay then, is aware of all dataClays 'connected' to him.
        Parameters:
        dataClayInstanceID - ID of dataClay registering current dataClay as external
        hostname - Host name
        port - Port
        Returns:
        ID of current dataClay or Null if not allowed or some error ocurred
      • getExternalDataClayID

        DataClayInstanceID getExternalDataClayID​(String dcHost,
                                                 int dcPort)
        Tries to connect to an external dataClay instance and retrieve its ID. *
        Parameters:
        dcHost - hostname of the external dataClay instance
        dcPort - port of the external dataClay instance
        Returns:
        id of the external dataClay instance
      • getExternalDataClayInfo

        DataClayInstance getExternalDataClayInfo​(DataClayInstanceID extDataClayID)
        Method that retrieves the info of an external dataClay instance
        Parameters:
        extDataClayID - id of the external (already registered) dataClay
        Returns:
        info of dataClay instance identified by specified ID. null if it is not registered in the system.
      • getClassesInNamespace

        Tuple<Namespace,​Set<MetaClass>> getClassesInNamespace​(String namespaceName)
        Get all classes from namespace with name provided in current dataClay.
        Parameters:
        namespaceName - Name of the namespace to get data from
        Returns:
        Namespace information, information of all classes registered in namespace and code of classes to deploy
      • importModelsFromExternalDataClay

        void importModelsFromExternalDataClay​(String extNamespaceName,
                                              DataClayInstanceID extDataClayID)
        Import classes in namespace from external dataClay provided
        Parameters:
        extNamespaceName - Name of the external namespace to get
        extDataClayID - External dataClay ID to get namespace/classes from
        Throws:
        Exception - If registration fails
      • getObjectInfo

        Tuple<String,​String> getObjectInfo​(SessionID sessionID,
                                                 ObjectID objectID)
        Method to check whether an object is accessible with the specified session and returns its classname and namespace of the class.
        Parameters:
        sessionID - ID of the session
        objectID - ID of object
        Returns:
        a tuple [class name, namespace] containing the class of the object, and the namespace of the class.
      • getObjectFromAlias

        Triple<ObjectID,​MetaClassID,​ExecutionEnvironmentID> getObjectFromAlias​(SessionID sessionID,
                                                                                           String alias)
        Retrieves the objectID corresponding to the object with the specified alias.
        Parameters:
        sessionID - ID of the session
        alias - alias of the object
        Returns:
        ID of the resulting object, class ID, and Hint for fast execution.
      • deleteAlias

        ObjectID deleteAlias​(SessionID sessionID,
                             String alias)
        Removes the alias of an object
        Parameters:
        sessionID - ID of the session
        alias - alias of the object
        Returns:
        ID of object with deleted alias
      • getObjectsMetaDataInfoOfClassForNM

        Map<ObjectID,​MetaDataInfo> getObjectsMetaDataInfoOfClassForNM​(MetaClassID classID)
        Retrieves the information of the objects instantiating the given class.
        Parameters:
        classID - the id of the class
        Returns:
        the information of the objects of the class indexed by Object ID
      • setDataSetIDFromGarbageCollector

        void setDataSetIDFromGarbageCollector​(ObjectID objectID,
                                              DataSetID dataSetID)
        Set DataSetID from GC
        Parameters:
        objectID - ID of the object
        dataSetID - ID of the dataset
      • setDataSetID

        void setDataSetID​(SessionID sessionID,
                          ObjectID objectID,
                          DataSetID dataSetID)
        Set dataset id of object
        Parameters:
        sessionID - ID of session
        objectID - ID of object
        dataSetID - ID of dataset
      • moveObject

        List<ObjectID> moveObject​(SessionID sessionID,
                                  ObjectID objectID,
                                  ExecutionEnvironmentID srcBackendID,
                                  ExecutionEnvironmentID destBackendID,
                                  boolean recursive)
        Method that moves an object from location to location.
        Parameters:
        sessionID - ID of the session
        objectID - ID of the object
        srcBackendID - ID of the source location
        destBackendID - ID of the destination location
        recursive - Indicates if sub-objects (int the src location or others) must be also moved or not.
        Returns:
        List of moved objects.
      • setObjectReadOnly

        void setObjectReadOnly​(SessionID sessionID,
                               ObjectID objectID)
        Method that sets the object as read only
        Parameters:
        sessionID - ID of the session
        objectID - ID of the object
      • setObjectReadWrite

        void setObjectReadWrite​(SessionID sessionID,
                                ObjectID objectID)
        Method that sets the object as read-write
        Parameters:
        sessionID - ID of the session
        objectID - ID of the object
      • getMetadataByOID

        MetaDataInfo getMetadataByOID​(SessionID sessionID,
                                      ObjectID objectID)
        Method that retrieves the locations of all the replicas of a specific object and its classname.
        Parameters:
        sessionID - ID of the session
        objectID - ID of the object
        Returns:
        MetaDataInfo of the object
      • getMetadataByOIDForDS

        MetaDataInfo getMetadataByOIDForDS​(ObjectID objectID)
        Get metadata by oid. TODO: functions without session ids (garbage collector for isntance) should be used in different way (dgasull)
        Parameters:
        objectID - Object ID
        Returns:
        Metadata info for EE.
      • executeImplementation

        SerializedParametersOrReturn executeImplementation​(SessionID sessionID,
                                                           OperationID operationID,
                                                           Triple<ImplementationID,​ContractID,​InterfaceID> remoteImplementation,
                                                           ObjectID objectID,
                                                           SerializedParametersOrReturn params)
        Method that executes an implementation
        Parameters:
        sessionID - ID of the session
        operationID - the operation to be executed
        remoteImplementation - info of the implementation to be executed
        objectID - the object on which the implementation is executed
        params - the serialized parameters for the operation
        Returns:
        Result of the operation (all objects serialized) or null if void.
      • executeMethodOnTarget

        SerializedParametersOrReturn executeMethodOnTarget​(SessionID sessionID,
                                                           ObjectID objectID,
                                                           String operationSignature,
                                                           SerializedParametersOrReturn params,
                                                           ExecutionEnvironmentID backendID)
        Method that executes a method on a specific target (using an arbitrary implementation given the session info).
        Parameters:
        sessionID - ID of the session.
        objectID - ID of the object on which the implementation is executed
        operationSignature - the operation signature of the method to be executed
        params - the serialized parameters for the method
        backendID - the backend where the method must be executed
        Returns:
        Result of the operation (all objects serialized) or null if void.
      • isPrefetchingEnabled

        boolean isPrefetchingEnabled()
        Indicates if dataClay has prefetching enabled.
        Returns:
        TRUE if prefetching is enabled in dataClay. FALSE otherwise.
      • getDataClayID

        DataClayInstanceID getDataClayID()
        Method that retrieves the ID of current dataClay instance
        Returns:
        ID of current dataclay
      • getStubs

        Map<String,​byte[]> getStubs​(AccountID applicantAccountID,
                                          PasswordCredential applicantCredential,
                                          CommonMessages.Langs language,
                                          List<ContractID> contractsIDs)
        Method that allows to retrieve the stubs of the given contracts (merging interfaces if necessary)
        Parameters:
        applicantAccountID - the applicant of the contract
        applicantCredential - the credentials of the applicant
        language - the language of the stub to generate
        contractsIDs - IDs of the contracts
        Returns:
        a Map of byte arrays with bytecode (or similar) for each stub
      • getBabelStubs

        byte[] getBabelStubs​(AccountID applicantAccountID,
                             PasswordCredential applicantCredential,
                             List<ContractID> contractsIDs)
        Method that allows to retrieve the "Babel" (language independent YAML-based) stubs of the given contracts (merging interfaces if necessary).
        Parameters:
        applicantAccountID - the applicant of the contract
        applicantCredential - the credentials of the applicant
        contractsIDs - IDs of the contracts
        Returns:
        a byte array with a YAML document, with each
      • getClassNameForDS

        String getClassNameForDS​(MetaClassID classID)
        Get class name for Data Service
        Parameters:
        classID - ID of the class
        Returns:
        Name of the class
      • getClassNameAndNamespaceForDS

        Tuple<String,​String> getClassNameAndNamespaceForDS​(MetaClassID classID)
        Get class name and namespace name for Data Service
        Parameters:
        classID - ID of the class
        Returns:
        Class name and namespace name of the class
      • registerEventListenerImplementation

        void registerEventListenerImplementation​(AccountID accountID,
                                                 PasswordCredential credential,
                                                 ECA newEventListener)
        Registers an event listener implementation
        Parameters:
        accountID - ID of account registering the event listener
        credential - Credentials of the account
        newEventListener - Event listener implementation to register.
      • objectExistsInDataClay

        boolean objectExistsInDataClay​(ObjectID objectID)
        Check if object exists in dataClay (in any EE memory or SL)
        Parameters:
        objectID - ID of the object to check
        Returns:
        TRUE if the object exists. FALSE otherwise.
      • adviseEvent

        void adviseEvent​(EventMessage newEvent)
        Advises Notification Manager new event has occurred.
        Parameters:
        newEvent - New event
      • activateTracing

        void activateTracing​(int currentAvailableTaskID)
        Activate tracing.
        Parameters:
        currentAvailableTaskID - Current starting task ID in Extrae
      • deactivateTracing

        void deactivateTracing()
        Deactivate Extrae tracing
      • getTraces

        Map<String,​byte[]> getTraces()
        Get Extrae traces (mpits and set files)
        Returns:
        Extrae traces (mpits and set files)
      • cleanMetaDataCaches

        void cleanMetaDataCaches()
        Clean MD caches
      • closeManagerDb

        void closeManagerDb()
        Close mgr db.
      • closeDb

        void closeDb()
        Close logic db.
      • getContractIDOfDataClayProvider

        ContractID getContractIDOfDataClayProvider​(AccountID accountID,
                                                   PasswordCredential credential)
        Get contract ID of DataClay classes
        Parameters:
        accountID - ID of the account querying
        credential - Credentials
        Returns:
        Contract ID of DataClay provider
      • unregisterObjects

        void unregisterObjects​(Set<ObjectID> objectsToUnregister)
        Unregister objects (called from GlobalGC)
        Parameters:
        objectsToUnregister - Objects to unregister
      • getNumObjects

        int getNumObjects()
        Get number of objects in dataClay
        Returns:
        number of objects in dataClay