Class PipelineTraceableHitChain


  • public final class PipelineTraceableHitChain
    extends java.lang.Object
    Class to represent the pipeline hit chain and the result of the pipeline processing.
    • Constructor Detail

      • PipelineTraceableHitChain

        public PipelineTraceableHitChain​(ConnectPoint output,
                                         java.util.List<DataPlaneEntity> hits,
                                         PipelineTraceablePacket packet)
        Creates a new PipelineTraceableHitChain.
        Parameters:
        output - the output connect point
        hits - the hits in the pipeline (flows, groups and other abstractions)
        packet - the traceable packet representing the final packet
    • Method Detail

      • emptyHitChain

        public static PipelineTraceableHitChain emptyHitChain()
        Creates an empty pipeline hit chain.
        Returns:
        an empty pipeline hit chain
      • outputPort

        public ConnectPoint outputPort()
        Returns the output connect point.
        Returns:
        the connect point
      • setOutputPort

        public void setOutputPort​(ConnectPoint outputPort)
        Sets the output port.
        Parameters:
        outputPort - the output port
      • hitChain

        public java.util.List<DataPlaneEntity> hitChain()
        Returns the hit chain.
        Returns:
        flows and groups that matched.
      • addDataPlaneEntity

        public void addDataPlaneEntity​(DataPlaneEntity dataPlaneEntity)
        Adds the provided dataplane entity to the end of the chain.
        Parameters:
        dataPlaneEntity - the dataplane entity
      • removeDataPlaneEntity

        public void removeDataPlaneEntity​(DataPlaneEntity dataPlaneEntity)
        Removes the provided dataplane entity from the chain.
        Parameters:
        dataPlaneEntity - the dataplane entity
      • egressPacket

        public PipelineTraceablePacket egressPacket()
        Returns the egress packet after traversing the pipeline.
        Returns:
        the traceable packet representing the packet infos
      • setEgressPacket

        public void setEgressPacket​(PipelineTraceablePacket egressPacket)
        Sets the egress packet.
        Parameters:
        egressPacket - the egress packet
      • isDropped

        public boolean isDropped()
        Return whether or not the packet has been dropped by the pipeline.
        Returns:
        true if the packet has been dropped. False, otherwise.
      • dropped

        public void dropped()
        Set the dropped flag.
      • pass

        public void pass()
        Unset the dropped flag.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object