public final class VTNFlowManager extends SalNotificationListener implements VTNSubSystem, VTNInventoryListener, BarrierSender, VtnFlowService, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener, org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener
Modifier and Type | Class and Description |
---|---|
protected static class |
VTNFlowManager.TxCounterCallback<T>
A callback for flow transaction future that decrements the transaction
counter.
|
Constructor and Description |
---|
VTNFlowManager(VTNManagerProvider provider,
org.opendaylight.controller.md.sal.binding.api.NotificationService nsv)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
VTNFuture<VtnFlowId> |
addFlow(VTNFlowBuilder builder)
Add a new VTN data flow.
|
void |
asyncBarrier(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nref)
Send a barrier request to the specified switch asynchronously.
|
void |
close()
Close the VTN flow manager service.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetDataFlowOutput>> |
getDataFlow(GetDataFlowInput input)
Return information about data flows specified by the RPC input.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetDataFlowCountOutput>> |
getDataFlowCount(GetDataFlowCountInput input)
Return the number of data flows present in the specified VTN.
|
protected org.slf4j.Logger |
getLogger()
Return a logger instance.
|
VTNFuture<?> |
initConfig(boolean master)
Post a MD-SAL datastore transaction task that initializes the
configuration.
|
void |
initRpcServices(org.opendaylight.controller.sal.binding.api.RpcProviderRegistry rpcReg,
CompositeAutoCloseable regs)
Register RPC implementation required by the subsystem.
|
void |
notifyVtnNode(VtnNodeEvent ev)
Invoked when a node information has been added or removed.
|
void |
notifyVtnPort(VtnPortEvent ev)
Invoked when a port information has been added, removed, or changed.
|
void |
onFlowAdded(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded notification)
Invoked when a flow entry has been added.
|
void |
onFlowRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved notification)
Invoked when a flow entry has been removed.
|
void |
onFlowUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated notification)
Invoked when a flow entry has been updated.
|
void |
onNodeErrorNotification(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification notification)
Invoked when an error has been detected.
|
void |
onNodeExperimenterErrorNotification(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeExperimenterErrorNotification notification)
Invoked when an experimental error has been detected.
|
void |
onSwitchFlowRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved notification)
Invoked when a flow entry has been removed from the switch.
|
void |
ownershipChanged(org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipChange change)
Invoked when the ownership status of the flow statistics has been
changed.
|
VTNFuture<Void> |
removeFlows(FlowRemover remover)
Remove VTN data flows selected by the given flow remover.
|
void |
shutdown()
Shut down the VTN flow service.
|
registerListener
addCloseable
public VTNFlowManager(VTNManagerProvider provider, org.opendaylight.controller.md.sal.binding.api.NotificationService nsv)
provider
- A VTN Manager provider service.nsv
- A NotificationService
service instance.public void shutdown()
public VTNFuture<VtnFlowId> addFlow(VTNFlowBuilder builder)
builder
- A VTNFlowBuilder
instance which contains
data flow to be installed.public VTNFuture<Void> removeFlows(FlowRemover remover)
remover
- A FlowRemover
instance which determines VTN data
flows to be removed.public void close()
close
in interface AutoCloseable
close
in class CloseableContainer
protected org.slf4j.Logger getLogger()
Note that this method will be called before the constructor returns.
getLogger
in class CloseableContainer
Logger
instance.public VTNFuture<?> initConfig(boolean master)
initConfig
in interface VTNSubSystem
master
- true
if the local node is the configuration
provider.VTNFuture
instance associated with the task for
initialization. null
means that there is nothing to
do on initialization.public void initRpcServices(org.opendaylight.controller.sal.binding.api.RpcProviderRegistry rpcReg, CompositeAutoCloseable regs)
initRpcServices
in interface VTNSubSystem
rpcReg
- A RpcProviderRegistry
service instance.regs
- A CompositeAutoCloseable
instance to store
RPC registration.public void notifyVtnNode(VtnNodeEvent ev) throws VTNException
notifyVtnNode
in interface VTNInventoryListener
ev
- A VtnNodeEvent
instance.VTNException
- An error occurred.public void notifyVtnPort(VtnPortEvent ev)
notifyVtnPort
in interface VTNInventoryListener
ev
- A VtnPortEvent
instance.public void asyncBarrier(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nref)
asyncBarrier
in interface BarrierSender
nref
- Reference to the target node.public Future<org.opendaylight.yangtools.yang.common.RpcResult<GetDataFlowOutput>> getDataFlow(GetDataFlowInput input)
getDataFlow
in interface VtnFlowService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<GetDataFlowCountOutput>> getDataFlowCount(GetDataFlowCountInput input)
getDataFlowCount
in interface VtnFlowService
input
- Input of the RPC.Future
associated with the RPC task.public void onFlowAdded(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowAdded notification)
onFlowAdded
in interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
notification
- A FlowAdded
instance.public void onFlowRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowRemoved notification)
onFlowRemoved
in interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
notification
- A FlowRemoved
notification.public void onFlowUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.FlowUpdated notification)
onFlowUpdated
in interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
notification
- A FlowUpdated
notification.public void onNodeErrorNotification(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification notification)
onNodeErrorNotification
in interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
notification
- A NodeErrorNotification
notification.public void onNodeExperimenterErrorNotification(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeExperimenterErrorNotification notification)
onNodeExperimenterErrorNotification
in interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
notification
- A NodeExperimenterErrorNotification
notification.public void onSwitchFlowRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved notification)
onSwitchFlowRemoved
in interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener
notification
- A SwitchFlowRemoved
notification.public void ownershipChanged(org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipChange change)
ownershipChanged
in interface org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener
change
- An EntityOwnershipChange
instance.Copyright © 2018 OpenDaylight. All rights reserved.