Package org.eclipse.viatra.query.runtime.rete.boundary

## Class ReteBoundary

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.boundary.ReteBoundary

-     public class ReteBoundary
      extends java.lang.Object

  Responsible for the storage, maintenance and communication of the nodes of the network that are accessible form the outside for various reasons.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ReteEngine` | `engine` |
    `protected ReteContainer` | `headContainer` |
    `protected InputConnector` | `inputConnector` |
    `protected Network` | `network` |
    `protected java.util.Map<Address<? extends Receiver>,​java.util.Set<SubPlan>>` | `parentPlansOfReceiver` | SubPlans of parent nodes that have the key node as their child.
    `protected java.util.Map<SubPlan,​Address<? extends Supplier>>` | `subplanToAddressMapping` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ReteBoundary​(ReteEngine engine)` | Prerequisite: engine has its network and framework fields initialized

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Address<? extends ProductionNode>` | `accessProductionNode​(PQuery query)` | accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
    `RecipeTraceInfo` | `accessProductionTrace​(PQuery query)` | accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
    `Address<? extends Supplier>` | `getAddress​(SubPlan plan)` |
    `java.util.Collection<? extends RecipeTraceInfo>` | `getAllProductionNodes()` |
    `ReteContainer` | `getHeadContainer()` |
    `void` | `mapPlanToAddress​(SubPlan plan, Address<? extends Supplier> handle)` |
    `void` | `notifyEvaluator​(Address<? extends Receiver> receiver, Tuple tuple)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### engine

          protected ReteEngine engine

    - #### network

          protected Network network

    - #### headContainer

          protected ReteContainer headContainer

    - #### inputConnector

          protected final InputConnector inputConnector

    - #### subplanToAddressMapping

          protected java.util.Map<SubPlan,​Address<? extends Supplier>> subplanToAddressMapping

    - #### parentPlansOfReceiver

          protected java.util.Map<Address<? extends Receiver>,​java.util.Set<SubPlan>> parentPlansOfReceiver

      SubPlans of parent nodes that have the key node as their child. For RETE --> SubPlan traceability, mainly at production nodes.

  - ### Constructor Detail

    - #### ReteBoundary

          public ReteBoundary​(ReteEngine engine)

      Prerequisite: engine has its network and framework fields initialized

  - ### Method Detail

    - #### getHeadContainer

          public ReteContainer getHeadContainer()

    - #### getAllProductionNodes

          public java.util.Collection<? extends RecipeTraceInfo> getAllProductionNodes()

    - #### accessProductionTrace

          public RecipeTraceInfo accessProductionTrace​(PQuery query)

      accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
      Throws:
        `ViatraQueryRuntimeException`

    - #### accessProductionNode

          public Address<? extends ProductionNode> accessProductionNode​(PQuery query)

      accesses the production node for specified pattern; builds pattern matcher if it doesn't exist yet
      Throws:
        `ViatraQueryRuntimeException`

    - #### notifyEvaluator

          public void notifyEvaluator​(Address<? extends Receiver> receiver,
                                      Tuple tuple)

    - #### mapPlanToAddress

          public void mapPlanToAddress​(SubPlan plan,
                                       Address<? extends Supplier> handle)

    - #### getAddress

          public Address<? extends Supplier> getAddress​(SubPlan plan)