Package org.onosproject.net.flow
Class DefaultTrafficTreatment
- java.lang.Object
-
- org.onosproject.net.flow.DefaultTrafficTreatment
-
- All Implemented Interfaces:
TrafficTreatment
public final class DefaultTrafficTreatment extends Object implements TrafficTreatment
Default traffic treatment implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultTrafficTreatment.BuilderBuilds a list of treatments following the following order.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Instruction>allInstructions()Returns the list of all instructions in the treatment, both immediate and deferred.static TrafficTreatment.Builderbuilder()Returns a new traffic treatment builder.static TrafficTreatment.Builderbuilder(TrafficTreatment treatment)Returns a new traffic treatment builder primed to produce entities patterned after the supplied treatment.booleanclearedDeferred()Whether the deferred treatment instructions will be cleared by the device.List<Instruction>deferred()Returns the list of treatment instructions that will be applied further down the pipeline.static TrafficTreatmentemptyTreatment()Returns an empty traffic treatment.booleanequals(Object obj)inthashCode()List<Instruction>immediate()Returns the list of treatment instructions that will be applied immediately.Instructions.MeterInstructionmetered()Returns the meter instruction if there is one.Set<Instructions.MeterInstruction>meters()Returns the meter instructions if there is any.Instructions.StatTriggerInstructionstatTrigger()Returns the stat trigger instruction if there is one.Instructions.TableTypeTransitiontableTransition()Returns the next table in the pipeline.StringtoString()Instructions.MetadataInstructionwriteMetadata()Returns the metadata instruction if there is one.
-
-
-
Method Detail
-
deferred
public List<Instruction> deferred()
Description copied from interface:TrafficTreatmentReturns the list of treatment instructions that will be applied further down the pipeline.- Specified by:
deferredin interfaceTrafficTreatment- Returns:
- list of treatment instructions
-
immediate
public List<Instruction> immediate()
Description copied from interface:TrafficTreatmentReturns the list of treatment instructions that will be applied immediately.- Specified by:
immediatein interfaceTrafficTreatment- Returns:
- list of treatment instructions
-
allInstructions
public List<Instruction> allInstructions()
Description copied from interface:TrafficTreatmentReturns the list of all instructions in the treatment, both immediate and deferred.- Specified by:
allInstructionsin interfaceTrafficTreatment- Returns:
- list of treatment instructions
-
tableTransition
public Instructions.TableTypeTransition tableTransition()
Description copied from interface:TrafficTreatmentReturns the next table in the pipeline.- Specified by:
tableTransitionin interfaceTrafficTreatment- Returns:
- a table transition; may be null.
-
clearedDeferred
public boolean clearedDeferred()
Description copied from interface:TrafficTreatmentWhether the deferred treatment instructions will be cleared by the device.- Specified by:
clearedDeferredin interfaceTrafficTreatment- Returns:
- a boolean
-
writeMetadata
public Instructions.MetadataInstruction writeMetadata()
Description copied from interface:TrafficTreatmentReturns the metadata instruction if there is one.- Specified by:
writeMetadatain interfaceTrafficTreatment- Returns:
- a metadata instruction that may be null
-
statTrigger
public Instructions.StatTriggerInstruction statTrigger()
Description copied from interface:TrafficTreatmentReturns the stat trigger instruction if there is one.- Specified by:
statTriggerin interfaceTrafficTreatment- Returns:
- a stat trigger instruction; may be null.
-
metered
public Instructions.MeterInstruction metered()
Description copied from interface:TrafficTreatmentReturns the meter instruction if there is one.- Specified by:
meteredin interfaceTrafficTreatment- Returns:
- a meter instruction that may be a null.
-
meters
public Set<Instructions.MeterInstruction> meters()
Description copied from interface:TrafficTreatmentReturns the meter instructions if there is any.- Specified by:
metersin interfaceTrafficTreatment- Returns:
- meter instructions that may be an empty set.
-
builder
public static TrafficTreatment.Builder builder()
Returns a new traffic treatment builder.- Returns:
- traffic treatment builder
-
emptyTreatment
public static TrafficTreatment emptyTreatment()
Returns an empty traffic treatment.- Returns:
- empty traffic treatment
-
builder
public static TrafficTreatment.Builder builder(TrafficTreatment treatment)
Returns a new traffic treatment builder primed to produce entities patterned after the supplied treatment.- Parameters:
treatment- base treatment- Returns:
- traffic treatment builder
-
-