public final class MacMapStatusReader extends AbstractPreSubmitHook
An instance of this class must be obtained by
TxContext.getSpecific(Class)
.
Constructor and Description |
---|
MacMapStatusReader(TxContext ctx)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Discard all the cached instances.
|
VTNMacMapStatus |
get(MacMapIdentifier ident)
Return the runtime status of the given MAC mapping.
|
VTNMacMapStatus |
getCached(MacMapIdentifier ident)
Return the runtime status of the given MAC mapping only if it is cached
in this instance.
|
int |
getOrder()
Return an integer that determines the order of execution.
|
VTNMacMapStatus |
put(MacMapIdentifier ident,
VTNMacMapStatus vmst)
Put the given MAC mapping status only if not cached.
|
VTNMacMapStatus |
remove(MacMapIdentifier ident)
Discard the status information about the specified MAC mapping.
|
void |
run(TxContext ctx,
TxTask<?> task)
Invoked when the MD-SAL datastore transaction is going to be submitted.
|
getContext
public MacMapStatusReader(TxContext ctx)
ctx
- A runtime context for transaction task.public VTNMacMapStatus get(MacMapIdentifier ident) throws VTNException
ident
- A MacMapIdentifier
instance that specifies the
target MAC mapping.VTNMacMapStatus
instance.VTNException
- An error occurred.public VTNMacMapStatus getCached(MacMapIdentifier ident)
ident
- A MacMapIdentifier
instance that specifies the
target MAC mapping.VTNMacMapStatus
instance if the status of the
specified MAC mapping is cached in this instance.
null
if not cached.public VTNMacMapStatus put(MacMapIdentifier ident, VTNMacMapStatus vmst)
ident
- A MacMapIdentifier
instance that specifies the
target MAC mapping.vmst
- A VTNMacMapStatus
instance that represents the
status of the MAC mapping specified by ident
.VTNMacMapStatus
instance actually cached in this
instance.public VTNMacMapStatus remove(MacMapIdentifier ident)
ident
- A MacMapIdentifier
instance that specifies the
target MAC mapping.VTNMacMapStatus
instance is returned. null
is returned if the status
information for the specified MAC mapping is not present in
this instance.public void clear()
public void run(TxContext ctx, TxTask<?> task)
This method puts all modified MAC mapping status 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.