public final class PacketOutQueue extends Object implements TxHook
PacketOutQueue
describes a queue for packets to transmit.
An instance of this class must be obtained by
TxContext.getSpecific(Class)
. All the queued packets are
transmitted just after the successful completion of the MD-SAL datastore
transaction associated with this instance. Note that packets will be
discarded when the transaction is canceled.
Constructor and Description |
---|
PacketOutQueue(TxContext ctx)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
enqueue(SalPort egress,
Packet packet)
Enqueue the given packet to the transmission queue.
|
int |
getOrder()
Return an integer that determines the order of execution.
|
void |
run(TxContext ctx,
TxTask<?> task)
Invoked when the MD-SAL datastore transaction has been submitted
successfully.
|
public PacketOutQueue(TxContext ctx)
ctx
- A runtime context for transaction task.public void enqueue(SalPort egress, Packet packet)
public void run(TxContext ctx, TxTask<?> task)
This method transmits all the packets in the transmission queue.
Copyright © 2018 OpenDaylight. All rights reserved.