public final class FlowAddQueue extends Object implements TxHook
FlowAddQueue describes a queue for flow entries to be installed.
An instance of this class must be obtained by
TxContext.getSpecific(Class). All the queued flow entries are
installed asynchronously just after the successful completion of the
MD-SAL datastore transaction associated with this instance.
Note that requests will be discarded when the transaction is canceled.
| Constructor and Description |
|---|
FlowAddQueue(TxContext ctx)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enqueue(VTNFlowBuilder builder)
Enqueue the given data flow to the request queue.
|
int |
getOrder()
Return an integer that determines the order of execution.
|
Collection<VTNFlowBuilder> |
getRequests()
Return an unmodifiable collection that contains flow entries in the
queue.
|
void |
run(TxContext ctx,
TxTask<?> task)
Invoked when the MD-SAL datastore transaction has been submitted
successfully.
|
public FlowAddQueue(TxContext ctx)
ctx - A runtime context for transaction task.public void enqueue(VTNFlowBuilder builder)
builder - A VTNFlowBuilder instance that contains
data flow to be installed.public Collection<VTNFlowBuilder> getRequests()
VTNFlowBuilder instances.public void run(TxContext ctx, TxTask<?> task)
This method installs all the flow entries in the request queue.
Copyright © 2018 OpenDaylight. All rights reserved.