|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.floodlightcontroller.devicemanager.internal.DeviceIndex
net.floodlightcontroller.devicemanager.internal.DeviceUniqueIndex
public class DeviceUniqueIndex
An index that maps key fields of an entity uniquely to a device key
| Field Summary |
|---|
| Fields inherited from class net.floodlightcontroller.devicemanager.internal.DeviceIndex |
|---|
keyFields |
| Constructor Summary | |
|---|---|
DeviceUniqueIndex(java.util.EnumSet<IDeviceService.DeviceField> keyFields)
Construct a new device index using the provided key fields |
|
| Method Summary | |
|---|---|
java.lang.Long |
findByEntity(Entity entity)
Look up a Device based on the provided Entity. |
java.util.Iterator<java.lang.Long> |
getAll()
Get all device keys in the index. |
java.util.Iterator<java.lang.Long> |
queryByEntity(Entity entity)
Find all device keys in the index that match the given entity on all the key fields for this index |
void |
removeEntity(Entity entity)
Remove the entry for the given entity |
void |
removeEntity(Entity entity,
java.lang.Long deviceKey)
Remove the given device key from the index for the given entity |
boolean |
updateIndex(Device device,
java.lang.Long deviceKey)
Attempt to update an index with the entities in the provided Device. |
void |
updateIndex(Entity entity,
java.lang.Long deviceKey)
Add a mapping from the given entity to the given device key. |
| Methods inherited from class net.floodlightcontroller.devicemanager.internal.DeviceIndex |
|---|
removeEntityIfNeeded |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeviceUniqueIndex(java.util.EnumSet<IDeviceService.DeviceField> keyFields)
keyFields - the key fields to use| Method Detail |
|---|
public java.util.Iterator<java.lang.Long> queryByEntity(Entity entity)
DeviceIndex
queryByEntity in class DeviceIndexpublic java.util.Iterator<java.lang.Long> getAll()
DeviceIndex
getAll in class DeviceIndex
public boolean updateIndex(Device device,
java.lang.Long deviceKey)
DeviceIndexDevice. If the update fails because of a concurrent update,
will return false.
updateIndex in class DeviceIndexdevice - the device to updatedeviceKey - the device key for the device
public void updateIndex(Entity entity,
java.lang.Long deviceKey)
DeviceIndex
updateIndex in class DeviceIndexdeviceKey - the device key for the devicepublic void removeEntity(Entity entity)
DeviceIndex
removeEntity in class DeviceIndexentity - the entity to remove
public void removeEntity(Entity entity,
java.lang.Long deviceKey)
DeviceIndex
removeEntity in class DeviceIndexentity - the entity to search fordeviceKey - the key to removepublic java.lang.Long findByEntity(Entity entity)
Device based on the provided Entity.
entity - the entity to search for
Device object if found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||