Class D3NodeFactory

    • Method Detail

      • getInstance

        public static D3NodeFactory getInstance​(Repository aRepository)
        Get a D3 engine factory.
        Parameters:
        aRepository - repository in which D3 is running
        Throws:
        NullPointerException - if no repository is defined.
      • createForMasterFromSession

        public D3NodeAsMaster createForMasterFromSession​(Session aSession)
        Creates a primary D3 engine to offer primary administrative functionalities.
        Parameters:
        aSession - current user session
        Throws:
        IllegalStateException - if called within a Batch or if not in master or hub node.
        Since:
        5.4.2
      • createForSlaveFromSession

        public D3NodeAsSlave createForSlaveFromSession​(Session aSession)
        Creates a replica D3 engine to offer replica administrative functionalities.
        Parameters:
        aSession - current user session
        Throws:
        IllegalStateException - if called within a Batch or if not in slave or hub node.
        Since:
        5.4.2
      • getCurrentD3Node

        public D3Node getCurrentD3Node()
        Returns current D3Node of the EBX® instance. This can be invoked to perform read-only operations without a Session.

        If D3 mode is defined as single, then null is returned.

        Since:
        5.5.1
        See Also:
        D3NodeAsMaster, D3NodeAsSlave
      • isMasterNode

        public boolean isMasterNode()
        Returns whether the current node is a primary node.

        If true, a primary engine can be created using the method createForMasterFromSession(Session).

        Since:
        5.4.2
      • isSlaveNode

        public boolean isSlaveNode()
        Returns whether the current node is a replica node.

        If true, a replica engine can be created using the method createForSlaveFromSession(Session).

        Since:
        5.4.2