public final class VTNInventoryManager extends MultiDataStoreListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>
| Constructor and Description |
|---|
VTNInventoryManager(VTNManagerProvider provider)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(VTNInventoryListener l)
Add the given VTN inventory listener.
|
void |
close()
Close the VTN inventory service.
|
protected org.opendaylight.vtn.manager.internal.inventory.InventoryEvents |
enterEvent()
Invoked when
AbstractDataChangeListener.onDataTreeChanged(Collection) has just been
called. |
protected void |
exitEvent(org.opendaylight.vtn.manager.internal.inventory.InventoryEvents ectx)
Invoked when
AbstractDataChangeListener.onDataTreeChanged(Collection) is going to leave. |
protected org.slf4j.Logger |
getLogger()
Return a logger instance.
|
VtnNodeManager |
getVtnNodeManager()
Return the VTN node manager.
|
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnNode> |
getWildcardPath()
Return a wildcard instance identifier that specifies data objects
to be listened.
|
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.inventory.InventoryEvents ectx,
ChangedData<?> data)
Determine whether the specified data was updated or not.
|
StaticTopologyManager |
newStaticTopologyManager()
Create a new static network topology manager.
|
protected void |
onCreated(org.opendaylight.vtn.manager.internal.inventory.InventoryEvents ectx,
IdentifiedData<?> data)
Invoked when a new data has been created in the datastore.
|
protected void |
onRemoved(org.opendaylight.vtn.manager.internal.inventory.InventoryEvents ectx,
IdentifiedData<?> data)
Invoked when a data has been removed from the datastore.
|
protected void |
onUpdated(org.opendaylight.vtn.manager.internal.inventory.InventoryEvents ectx,
ChangedData<?> data)
Invoked when a data in the datastore has been updated.
|
void |
shutdown()
Shutdown listener service.
|
void |
start()
Start the inventory service.
|
handleTreecheckPath, getTargetType, isRequiredEvent, nullValue, onDataTreeChanged, registerListeneraddCloseablepublic VTNInventoryManager(VTNManagerProvider provider)
provider - A VTN Manager provider service.public StaticTopologyManager newStaticTopologyManager()
StaticTopologyManager instance.public void start()
public void addListener(VTNInventoryListener l)
l - A VTN inventory listener.public VtnNodeManager getVtnNodeManager()
public void shutdown()
public void close()
close in interface AutoCloseableclose in class CloseableContainerprotected boolean isDepth(@Nonnull VtnUpdateType type)
isDepth in class MultiDataStoreListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>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<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>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)
This method returns true only if the specified type is
VtnPort.
isLeafNode in class MultiDataStoreListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>type - A class that specifies the type of the tree node.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.inventory.InventoryEvents 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<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>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.inventory.InventoryEvents enterEvent()
AbstractDataChangeListener.onDataTreeChanged(Collection) has just been
called.enterEvent in class AbstractDataChangeListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>protected void exitEvent(org.opendaylight.vtn.manager.internal.inventory.InventoryEvents 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<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>ectx - An event context created by AbstractDataChangeListener.enterEvent().protected void onCreated(org.opendaylight.vtn.manager.internal.inventory.InventoryEvents ectx,
IdentifiedData<?> data)
onCreated in class MultiDataStoreListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>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.inventory.InventoryEvents ectx,
ChangedData<?> data)
onUpdated in class MultiDataStoreListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>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.inventory.InventoryEvents ectx,
IdentifiedData<?> data)
onRemoved in class MultiDataStoreListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>ectx - An event context created by this instance.data - An IdentifiedData instance which contains the
removed data.protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VtnNode> getWildcardPath()
getWildcardPath in class AbstractDataChangeListener<VtnNode,org.opendaylight.vtn.manager.internal.inventory.InventoryEvents>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.