|
||||||||||
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.DeviceMultiIndex
public class DeviceMultiIndex
An index that maps key fields of an entity to device keys, with multiple device keys allowed per entity
Field Summary |
---|
Fields inherited from class net.floodlightcontroller.devicemanager.internal.DeviceIndex |
---|
keyFields |
Constructor Summary | |
---|---|
DeviceMultiIndex(java.util.EnumSet<IDeviceService.DeviceField> keyFields)
|
Method Summary | |
---|---|
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 DeviceMultiIndex(java.util.EnumSet<IDeviceService.DeviceField> keyFields)
keyFields
- Method Detail |
---|
public java.util.Iterator<java.lang.Long> queryByEntity(Entity entity)
DeviceIndex
queryByEntity
in class DeviceIndex
public java.util.Iterator<java.lang.Long> getAll()
DeviceIndex
getAll
in class DeviceIndex
public boolean updateIndex(Device device, java.lang.Long deviceKey)
DeviceIndex
Device
. If the update fails because of a concurrent update,
will return false.
updateIndex
in class DeviceIndex
device
- the device to updatedeviceKey
- the device key for the device
public void updateIndex(Entity entity, java.lang.Long deviceKey)
DeviceIndex
updateIndex
in class DeviceIndex
deviceKey
- the device key for the devicepublic void removeEntity(Entity entity)
DeviceIndex
removeEntity
in class DeviceIndex
entity
- the entity to removepublic void removeEntity(Entity entity, java.lang.Long deviceKey)
DeviceIndex
removeEntity
in class DeviceIndex
entity
- the entity to search fordeviceKey
- the key to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |