Interface TrafficTreatment.Builder

    • Method Detail

      • setVlanPcp

        TrafficTreatment.Builder setVlanPcp​(java.lang.Byte pcp)
        Sets the vlan priority.
        Parameters:
        pcp - a vlan priority
        Returns:
        a treatment builder
      • popMpls

        TrafficTreatment.Builder popMpls​(EthType etherType)
        Pops MPLS ether type and set the new ethertype.
        Parameters:
        etherType - an ether type
        Returns:
        a treatment builder
      • setMplsBos

        TrafficTreatment.Builder setMplsBos​(boolean mplsBos)
        Sets the mpls bottom-of-stack indicator bit.
        Parameters:
        mplsBos - boolean to set BOS=1 (true) or BOS=0 (false)
        Returns:
        a treatment builder.
      • setQueue

        TrafficTreatment.Builder setQueue​(long queueId)
        Sets the Queue ID.
        Parameters:
        queueId - a queue ID
        Returns:
        a treatment builder
      • setQueue

        TrafficTreatment.Builder setQueue​(long queueId,
                                          PortNumber port)
        Sets the Queue ID for a specific port.
        Parameters:
        queueId - a queue ID
        port - a port number
        Returns:
        a treatment builder
      • meter

        TrafficTreatment.Builder meter​(MeterId meterId)
        Sets a meter to be used by this flow.
        Parameters:
        meterId - a meter id
        Returns:
        a treatment builder
      • transition

        TrafficTreatment.Builder transition​(java.lang.Integer tableId)
        Sets the next table id to transition to.
        Parameters:
        tableId - the table table
        Returns:
        a treatement builder
      • pushVlan

        TrafficTreatment.Builder pushVlan​(EthType ethType)
        Pushes a new VLAN tag using the supplied Ethernet type.
        Parameters:
        ethType - ethernet type
        Returns:
        a treatment builder
      • deferred

        TrafficTreatment.Builder deferred()
        Any instructions followed by this method call will be deferred.
        Returns:
        a treatment builder
      • immediate

        TrafficTreatment.Builder immediate()
        Any instructions followed by this method call will be immediate.
        Returns:
        a treatment builder
      • wipeDeferred

        TrafficTreatment.Builder wipeDeferred()
        Instructs the device to clear the deferred instructions set.
        Returns:
        a treatment builder
      • notWipeDeferred

        TrafficTreatment.Builder notWipeDeferred()
        the instruction to clear not wipe the deferred instructions set.
        Returns:
        a treatment builder
      • writeMetadata

        TrafficTreatment.Builder writeMetadata​(long value,
                                               long mask)
        Writes metadata to associate with a packet.
         
         new_metadata = (old_metadata &  ̃mask) | (value & mask)
         
         
        Parameters:
        value - the metadata to write
        mask - the masked bits for the value
        Returns:
        a treatment builder
      • setTunnelId

        TrafficTreatment.Builder setTunnelId​(long tunnelId)
        Sets the tunnel id.
        Parameters:
        tunnelId - a tunnel id
        Returns:
        a treatment builder
      • setArpOp

        TrafficTreatment.Builder setArpOp​(short op)
        Sets the arp operation.
        Parameters:
        op - the value of arp operation.
        Returns:
        a treatment builder.
      • piTableAction

        @Beta
        TrafficTreatment.Builder piTableAction​(PiTableAction piTableAction)
        Sets the protocol independent table action.
        Parameters:
        piTableAction - protocol-independent table action
        Returns:
        a treatment builder.
      • setIpDscp

        TrafficTreatment.Builder setIpDscp​(byte dscpValue)
        Sets the IP DSCP field.
        Parameters:
        dscpValue - the DSCP value
        Returns:
        a treatment builder.
      • statTrigger

        TrafficTreatment.Builder statTrigger​(java.util.Map<StatTriggerField,​java.lang.Long> statTriggerFieldMap,
                                             StatTriggerFlag statTriggerFlag)
        Add stat trigger instruction.
        Parameters:
        statTriggerFieldMap - defines stat trigger constraints
        statTriggerFlag - describes which circumstances that start will be triggered
        Returns:
        a treatment builder
      • addTreatment

        TrafficTreatment.Builder addTreatment​(TrafficTreatment treatment)
        Add all instructions from another treatment.
        Parameters:
        treatment - another treatment
        Returns:
        a treatment builder
      • build

        TrafficTreatment build()
        Builds an immutable traffic treatment descriptor.

        If the treatment is empty when build() is called, it will add a default drop rule automatically. For a treatment that is actually empty, use DefaultTrafficTreatment.emptyTreatment().

        Returns:
        traffic treatment