Class Node

    • Constructor Detail

      • Node

        public Node()
    • Method Detail

      • getSuccessors

        public List<Node> getSuccessors()
        Get the successors ("children" in tree lingo) of this node.
        Returns:
        this node's successors
      • getUUID

        public String getUUID()
        Get the node's UUID.
        Returns:
        a UUID
      • getInputCardinality

        public Node.Cardinality getInputCardinality()
        Return the input cardinality of this node, i.e. how many bundles (not streams!) it expects to process. By default, nodes are "pipe-style", i.e. one input, one output.
        Returns:
        input cardinality
      • getOutputCardinality

        public Node.Cardinality getOutputCardinality()
        Return the output cardinality of this node, i.e. how many bundles (not streams!) it expects to produce. By default, nodes are "pipe-style", i.e. one input, one output.
        Returns:
        output cardinality
      • appendSuccessor

        public Node appendSuccessor​(Node successor)
        Append one successor ("child" in tree lingo) to this node.
        Parameters:
        successor - child node to be added
        Returns:
        the added successor
      • getWorkerClassName

        public String getWorkerClassName()
        Return the node's associated com.levigo.jadice.server.core.NodeWorker full qualified class's name. By default, the worker class name is
        • The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
        • The node class name with an appended "Worker" otherwise.
        The package name of the worker class is the name of the Node's package with an appended ".worker".

        This behavior can be overridden in concrete subclasses.

        Returns:
        the full qualified class name of the worker of this node.
        Since:
        jadice server 4.2.0.0
      • prependPredecessor

        public Node prependPredecessor​(Node predecessor)
        Add a predecessor ("parent" in tree lingo) to this node. Since in a tree scenario, a node has at most one parent, we use directed graph terminology here.
        Parameters:
        predecessor - a predecessor node
        Returns:
        the added predecessor
      • getPredecessors

        public List<Node> getPredecessors()
        Get the predecessors ("parents" in tree lingo) to this node. Since in a tree scenario, a node has at most one parent, we use directed graph terminology here.
        Returns:
        the added predecessor
      • getSubsidiaryNodes

        public Set<? extends Node> getSubsidiaryNodes()
        Nodes that were created on behalf of this node while executing the job on the server side can be retrieved with this method.
        Returns:
        an unmodifiable view of the subsidiary nodes that were created while job execution
        Since:
        jadice server 4.3.1.0
      • getJob

        public Job getJob()
        Get the associated job, or null if the node is not yet initialized.
        Returns:
        the associated job
      • initialize

        protected void initialize​(CommunicationSide side)
        Specified by:
        initialize in class com.levigo.jadice.server.internal.NodeInternal
      • getTransportSender

        protected final com.levigo.jadice.server.shared.transport.internal.TransportSender getTransportSender()
        Return a TransportSender for this node. The server sided worker can use this to communicate with the client sided node.
        Returns:
        a TransportSender
      • addTransportReceiver

        protected final void addTransportReceiver​(com.levigo.jadice.server.shared.transport.internal.TransportReceiver receiver)
        Add a TransportReceiver for this node.
        Parameters:
        receiver - the TransportReceiver to register
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • apply

        public void apply​(Limit limit)
        Apply a Limit to this Node.
        Parameters:
        limit - The limit to apply
      • remove

        public boolean remove​(Limit limit)
        Remove a previously applied Limit. This call will have no effect, if the limit has not been applied previously.
        Parameters:
        limit - the Limit to remove.
        Returns:
        true iff this limit was registered before.