public final class VNodeReader extends AbstractPreSubmitHook
An instance of this class must be obtained by
TxContext.getSpecific(Class)
.
Constructor and Description |
---|
VNodeReader(TxContext ctx)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
VirtualBridge<?> |
getBridge(TenantNodeIdentifier<?,?> ident)
Return the virtual bridge that contains the specified virtual node.
|
int |
getOrder()
Return an integer that determines the order of execution.
|
VBridge |
getVBridge(VBridgeIdentifier vbrId)
Return the specified vBridge.
|
VTerminal |
getVTerminal(VTerminalIdentifier vtmId)
Return the specified vTerminal.
|
void |
run(TxContext ctx,
TxTask<?> task)
Invoked when the MD-SAL datastore transaction is going to be submitted.
|
getContext
public VNodeReader(TxContext ctx)
ctx
- A runtime context for transaction task.public VirtualBridge<?> getBridge(TenantNodeIdentifier<?,?> ident) throws VTNException
ident
- A TenantNodeIdentifier
instance that specifies the
virtual node in the VTN.VirtualBridge
instance on success.
null
if the specified virtual bridge is not present.VTNException
- An error occurred.public VBridge getVBridge(VBridgeIdentifier vbrId) throws VTNException
vbrId
- A VBridgeIdentifier
instance which specifies the
vBridge.VBridge
instance on success.
null
if the specified vBridge is not present.VTNException
- An error occurred.public VTerminal getVTerminal(VTerminalIdentifier vtmId) throws VTNException
vtmId
- A VTerminalIdentifier
instance which specifies
the vTerminal.VTerminal
instance on success.
null
if the specified vTerminal is not present.VTNException
- An error occurred.public void run(TxContext ctx, TxTask<?> task)
This method puts all modified virtual nodes to the transaction.
ctx
- A runtime context for transaction task.task
- The current transaction task.public int getOrder()
Registered hooks are executed in ascending order of order values.
Copyright © 2018 OpenDaylight. All rights reserved.