public final class PathMapManager extends DataStoreListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange> implements VTNSubSystem, VtnPathMapService
Constructor and Description |
---|
PathMapManager(VTNManagerProvider provider)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
Future<org.opendaylight.yangtools.yang.common.RpcResult<ClearPathMapOutput>> |
clearPathMap(ClearPathMapInput input)
Remove all the path map configurations present in the global or VTN
path map container.
|
protected org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange |
enterEvent()
Invoked when
AbstractDataChangeListener.onDataTreeChanged(Collection) has just been
called. |
protected void |
exitEvent(org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange 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<VtnPathMap> |
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 |
isUpdated(VtnPathMap before,
VtnPathMap after)
Determine whether the specified data was updated or not.
|
protected void |
onCreated(org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange ectx,
IdentifiedData<VtnPathMap> data)
Invoked when a new data has been created in the datastore.
|
protected void |
onRemoved(org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange ectx,
IdentifiedData<VtnPathMap> data)
Invoked when a data has been removed from the datastore.
|
protected void |
onUpdated(org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange ectx,
ChangedData<VtnPathMap> data)
Invoked when a data in the datastore has been updated.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<RemovePathMapOutput>> |
removePathMap(RemovePathMapInput input)
Remove the path map configuration in the global or VTN path map.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<SetPathMapOutput>> |
setPathMap(SetPathMapInput input)
Create or modify the global or VTN path map.
|
handleTree
checkPath, getTargetType, isRequiredEvent, nullValue, onDataTreeChanged, registerListener
addCloseable, close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public PathMapManager(VTNManagerProvider provider)
provider
- VTN Manager provider service.protected org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange enterEvent()
AbstractDataChangeListener.onDataTreeChanged(Collection)
has just been
called.enterEvent
in class AbstractDataChangeListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
protected void exitEvent(org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange 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<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
ectx
- An event context created by AbstractDataChangeListener.enterEvent()
.protected void onCreated(org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange ectx, IdentifiedData<VtnPathMap> data)
onCreated
in class DataStoreListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
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.routing.GlobalPathMapChange ectx, ChangedData<VtnPathMap> data)
onUpdated
in class DataStoreListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
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.routing.GlobalPathMapChange ectx, IdentifiedData<VtnPathMap> data)
onRemoved
in class DataStoreListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
ectx
- An event context created by this instance.data
- An IdentifiedData
instance which contains the
removed data.protected boolean isUpdated(@Nonnull VtnPathMap before, @Nonnull VtnPathMap after)
DataStoreListener.onUpdated(Object, ChangedData)
is called only if this method
returns true
.
isUpdated
in class DataStoreListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
before
- The target data object before modification.after
- The target data object after modification.true
if the target data was updated.
false
otherwise.protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnPathMap> getWildcardPath()
getWildcardPath
in class AbstractDataChangeListener<VtnPathMap,org.opendaylight.vtn.manager.internal.routing.GlobalPathMapChange>
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 Future<org.opendaylight.yangtools.yang.common.RpcResult<SetPathMapOutput>> setPathMap(SetPathMapInput input)
If the name of the VTN is specified in the RPC input, this operation creates or modifies VTN path map that affect flows in the specified VTN. Otherwise this operation creates or modifies global path map that affect flows in all the VTNs.
setPathMap
in interface VtnPathMapService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<RemovePathMapOutput>> removePathMap(RemovePathMapInput input)
If the name of the VTN is specified in the RPC input, this operation removes VTN path map. Otherwise this operation removes global path map.
removePathMap
in interface VtnPathMapService
input
- Input of the RPC.Future
associated with the RPC task.public Future<org.opendaylight.yangtools.yang.common.RpcResult<ClearPathMapOutput>> clearPathMap(ClearPathMapInput input)
clearPathMap
in interface VtnPathMapService
input
- Input of the RPC.Future
associated with the RPC task.Copyright © 2018 OpenDaylight. All rights reserved.