public interface IEntityClassifierService
IEntityClass| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IEntityClassListener listener)
Adds a listener to listen for IEntityClassifierServices notifications
|
IEntityClass |
classifyEntity(Entity entity)
Classify the given entity into an IEntityClass.
|
void |
deviceUpdate(IDevice oldDevice,
Collection<? extends IDevice> newDevices)
Once reclassification is complete for a device, this method will be
called.
|
EnumSet<IDeviceService.DeviceField> |
getKeyFields()
Return the most general list of fields that should be used as key fields.
|
IEntityClass |
reclassifyEntity(IDevice curDevice,
Entity entity)
Reclassify the given entity into a class.
|
IEntityClass classifyEntity(Entity entity)
getKeyFields() be
sufficient for classifying entities. That is, if two entities are
identical except for a field that is not a key field, they must be
assigned the same class. Furthermore, entity classification must be
transitive: For all entities x, y, z, if x and y belong to a class c, and
y and z belong class c, then x and z must belong to class c.entity - the entity to classifygetKeyFields()EnumSet<IDeviceService.DeviceField> getKeyFields()
IEntityClass returned by
classifyEntity(org.opendaylight.controller.hosttracker.Entity). The key fields for an
entity classifier must not change unless associated with a flush of all
entity state. The list of key fields must be the union of all key fields
that could be returned by IEntityClass.getKeyFields().IEntityClass#getKeyFields()},
IEntityClassifierService#classifyEntity}IEntityClass reclassifyEntity(IDevice curDevice, Entity entity)
Note that you must take steps to ensure you always return classes in some consistent ordering.
curDevice - the device currently associated with the entityentity - the entity to reclassifyvoid deviceUpdate(IDevice oldDevice, Collection<? extends IDevice> newDevices)
oldDevice - the original device objectnewDevices - all the new devices derived from the entities of the old
device. If null, the old device was unchanged.void addListener(IEntityClassListener listener)
listener - The listener that wants the notificationsCopyright © 2015. All Rights Reserved.