public final class VTenantManager extends MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange> implements VTNSubSystem, VTNInventoryListener, VTNRoutingListener, VTNPacketListener, VtnService, VtnVterminalService, VtnFlowFilterService
Constructor and Description |
---|
VTenantManager(VTNManagerProvider provider)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected org.opendaylight.vtn.manager.internal.vnode.VTenantChange |
enterEvent()
Invoked when
AbstractDataChangeListener.onDataTreeChanged(Collection) has just been
called. |
protected void |
exitEvent(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx)
Invoked when
AbstractDataChangeListener.onDataTreeChanged(Collection) is going to leave. |
protected org.slf4j.Logger |
getLogger()
Return a logger instance.
|
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Vtn> |
getWildcardPath()
Return a wildcard instance identifier that specifies data objects
to be listened.
|
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.
|
protected boolean |
isDepth(VtnUpdateType type)
Return a boolean value which specifies the order of tree traversal.
|
protected boolean |
isLeafNode(Class<?> type)
Determine whether the specified type of the tree node should be
treated as a leaf node.
|
protected boolean |
isRequiredType(Class<?> type)
Determine whether the specified type of the tree node is required
to be notified or not.
|
protected boolean |
isUpdated(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx,
ChangedData<?> data)
Determine whether the specified data was updated or not.
|
void |
notifyPacket(PacketInEvent ev)
Invoked when a packet has been received.
|
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.
|
protected void |
onCreated(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx,
IdentifiedData<?> data)
Invoked when a new data has been created in the datastore.
|
protected void |
onRemoved(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx,
IdentifiedData<?> data)
Invoked when a data has been removed from the datastore.
|
protected void |
onUpdated(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx,
ChangedData<?> data)
Invoked when a data in the datastore has been updated.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowFilterOutput>> |
removeFlowFilter(RemoveFlowFilterInput input)
Remove the specified flow filters.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeVterminal(RemoveVterminalInput input)
Remove the specified vTerminal.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeVtn(RemoveVtnInput input)
Remove the specified VTN.
|
void |
routingUpdated(RoutingEvent ev)
Invoked when the packet routing table has been updated.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<SetFlowFilterOutput>> |
setFlowFilter(SetFlowFilterInput input)
Create or modify the flow filter.
|
void |
shutdown()
Trigger the system shutdownn sequence.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<UpdateVterminalOutput>> |
updateVterminal(UpdateVterminalInput input)
Create or modify the specified vTerminal.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<UpdateVtnOutput>> |
updateVtn(UpdateVtnInput input)
Create or modify the specified VTN.
|
handleTree
checkPath, getTargetType, isRequiredEvent, nullValue, onDataTreeChanged, registerListener
addCloseable, close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public VTenantManager(VTNManagerProvider provider)
provider
- A VTN Manager provider service.public void shutdown()
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.protected boolean isDepth(VtnUpdateType type)
isDepth
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
type
- A VtnUpdateType
instance which specifies the type
of event.true
means that each tree node's children need to be
processed after the tree node itself (from outer to innter).
false
means that each tree node's children need to be
processed before the tree node itself (from inner to outer).protected boolean isRequiredType(@Nonnull Class<?> type)
isRequiredType
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
type
- A class that specifies the type of the tree node.true
if the specified type of the tree node needs
to be notified. false
otherwise.protected boolean isLeafNode(@Nonnull Class<?> type)
isLeafNode
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
type
- A class that specifies the type of the tree node.
Note that this value may not be the target data type
specified by isRequiredType(Class)
.true
if the specified type of the tree node should
be treated as a leaf node. false
otherwise.protected boolean isUpdated(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx, ChangedData<?> data)
MultiDataStoreListener.onUpdated(Object, ChangedData)
is called only if this method
returns true
.
This method is called only if MultiDataStoreListener.isRequiredType(Class)
with
specifying type
returns true
.
isUpdated
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
ectx
- An event context created by this instance.data
- A ChangedData
instance which contains the
changed data.true
if the target data was updated.
false
otherwise.protected org.opendaylight.vtn.manager.internal.vnode.VTenantChange enterEvent()
AbstractDataChangeListener.onDataTreeChanged(Collection)
has just been
called.enterEvent
in class AbstractDataChangeListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
protected void exitEvent(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx)
AbstractDataChangeListener.onDataTreeChanged(Collection)
is going to leave.
Note that this method may be called even if no modified data was notified.
exitEvent
in class AbstractDataChangeListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
ectx
- An event context created by AbstractDataChangeListener.enterEvent()
.protected void onCreated(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx, IdentifiedData<?> data)
onCreated
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
ectx
- An event context created by this instance.data
- An IdentifiedData
instance which contains the
created data.protected void onUpdated(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx, ChangedData<?> data)
onUpdated
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
ectx
- An event context created by this instance.data
- A ChangedData
instance which contains the
changed data.protected void onRemoved(org.opendaylight.vtn.manager.internal.vnode.VTenantChange ectx, IdentifiedData<?> data)
onRemoved
in class MultiDataStoreListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
ectx
- An event context created by this instance.data
- An IdentifiedData
instance which contains the
removed data.protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Vtn> getWildcardPath()
getWildcardPath
in class AbstractDataChangeListener<Vtn,org.opendaylight.vtn.manager.internal.vnode.VTenantChange>
protected org.slf4j.Logger getLogger()
Note that this method will be called before the constructor returns.
getLogger
in class CloseableContainer
Logger
instance.public void notifyVtnNode(VtnNodeEvent ev) throws VTNException
notifyVtnNode
in interface VTNInventoryListener
ev
- A VtnNodeEvent
instance.VTNException
- An error occurred.public void notifyVtnPort(VtnPortEvent ev) throws VTNException
notifyVtnPort
in interface VTNInventoryListener
ev
- A VtnPortEvent
instance.VTNException
- An error occurred.public void routingUpdated(RoutingEvent ev) throws VTNException
routingUpdated
in interface VTNRoutingListener
ev
- A RoutingEvent
instance.VTNException
- An error occurred.public void notifyPacket(PacketInEvent ev)
notifyPacket
in interface VTNPacketListener
ev
- A PacketInEvent
instance.public Future<org.opendaylight.yangtools.yang.common.RpcResult<UpdateVtnOutput>> updateVtn(UpdateVtnInput input)
updateVtn
in interface VtnService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeVtn(RemoveVtnInput input)
removeVtn
in interface VtnService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<UpdateVterminalOutput>> updateVterminal(UpdateVterminalInput input)
updateVterminal
in interface VtnVterminalService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeVterminal(RemoveVterminalInput input)
removeVterminal
in interface VtnVterminalService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<SetFlowFilterOutput>> setFlowFilter(SetFlowFilterInput input)
setFlowFilter
in interface VtnFlowFilterService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowFilterOutput>> removeFlowFilter(RemoveFlowFilterInput input)
removeFlowFilter
in interface VtnFlowFilterService
input
- Input of the RPC.Future
associated with the RPC task.Copyright © 2018 OpenDaylight. All rights reserved.