Class UnionInputGate

  • All Implemented Interfaces:
    AutoCloseable, AvailabilityProvider, ChannelStateHolder, PullingAsyncDataInput<BufferOrEvent>

    public class UnionInputGate
    extends InputGate
    Input gate wrapper to union the input from multiple input gates.

    Each input gate has input channels attached from which it reads data. At each input gate, the input channels have unique IDs from 0 (inclusive) to the number of input channels (exclusive).

     +---+---+      +---+---+---+
     | 0 | 1 |      | 0 | 1 | 2 |
     +--------------+--------------+
     | Input gate 0 | Input gate 1 |
     +--------------+--------------+
     

    The union input gate maps these IDs from 0 to the *total* number of input channels across all unioned input gates, e.g. the channels of input gate 0 keep their original indexes and the channel indexes of input gate 1 are set off by 2 to 2--4.

     +---+---++---+---+---+
     | 0 | 1 || 2 | 3 | 4 |
     +--------------------+
     | Union input gate   |
     +--------------------+
     
    It is NOT possible to recursively union union input gates.