public final class SalFlowIdResolver extends DataStoreListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>
SalFlowIdResolver is used to resolve MD-SAL flow ID assigned to
the VTN flow.
Flow entries installed by the VTN Manager has no MD-SAL flow ID because it installs flow entries without using the MD-SAL FRM. But pseudo MD-SAL flow identifier will be assigned to every flow entries by the MD-SAL statistics manager. This class listens the flow statistics in the MD-SAL datastore, and determine MD-SAL flow ID assigned assigned by the MD-SAL statistics manager.
| Constructor and Description |
|---|
SalFlowIdResolver(VTNManagerProvider provider,
TxQueue txq)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected AddedFlowStats |
enterEvent()
Invoked when
AbstractDataChangeListener.onDataTreeChanged(Collection) has just been
called. |
protected void |
exitEvent(AddedFlowStats 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<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> |
getWildcardPath()
Return a wildcard instance identifier that specifies data objects
to be listened.
|
protected boolean |
isRequiredEvent(VtnUpdateType type)
Determine whether the specified event type should be handled or not.
|
protected boolean |
isUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow before,
org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow after)
Always returns
false because this listener has no interest in
the change of MD-SAL flow. |
protected void |
onCreated(AddedFlowStats ectx,
IdentifiedData<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> data)
Invoked when a new data has been created in the datastore.
|
protected void |
onRemoved(AddedFlowStats ectx,
IdentifiedData<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> data)
Invoked when a data has been removed from the datastore.
|
protected void |
onUpdated(AddedFlowStats ectx,
ChangedData<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> data)
Invoked when a data in the datastore has been updated.
|
handleTreecheckPath, getTargetType, nullValue, onDataTreeChanged, registerListeneraddCloseable, closepublic SalFlowIdResolver(VTNManagerProvider provider, TxQueue txq)
provider - VTN Manager provider service.txq - A TxQueue instance used to update the VTN
flow information.protected AddedFlowStats enterEvent()
AbstractDataChangeListener.onDataTreeChanged(Collection) has just been
called.enterEvent in class AbstractDataChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>protected void exitEvent(AddedFlowStats 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<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>ectx - An event context created by AbstractDataChangeListener.enterEvent().protected void onCreated(AddedFlowStats ectx, IdentifiedData<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> data)
onCreated in class DataStoreListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>ectx - An event context created by this instance.data - An IdentifiedData instance which contains the
created data.protected void onUpdated(AddedFlowStats ectx, ChangedData<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> data)
onUpdated in class DataStoreListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>ectx - An event context created by this instance.data - A ChangedData instance which contains the
changed data.protected void onRemoved(AddedFlowStats ectx, IdentifiedData<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> data)
onRemoved in class DataStoreListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>ectx - An event context created by this instance.data - An IdentifiedData instance which contains the
removed data.protected boolean isUpdated(@Nonnull org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow before, @Nonnull org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow after)
false because this listener has no interest in
the change of MD-SAL flow.isUpdated in class DataStoreListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>before - The target data object before modification.after - The target data object after modification.false.protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> getWildcardPath()
getWildcardPath in class AbstractDataChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>protected boolean isRequiredEvent(@Nonnull VtnUpdateType type)
This method returns true only if the given type is
VtnUpdateType.CREATED.
isRequiredEvent in class AbstractDataChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow,AddedFlowStats>type - A VtnUpdateType instance which indicates the event
type.true if the given event type should be handled.
false otherwise.protected org.slf4j.Logger getLogger()
Note that this method will be called before the constructor returns.
getLogger in class CloseableContainerLogger instance.Copyright © 2018 OpenDaylight. All rights reserved.