public interface DeviceStoreService
Modifier and Type | Method and Description |
---|---|
boolean |
addDevice(Device device)
Persist and team this device.
|
void |
baseSystem(boolean baseSystem)
Used by DeviceSyncService to signal initialize from persist or team.
|
Set<Device> |
getDevice(DeviceFilter filter)
Retrieve the devices from fast lookup cache.
|
Device |
getDevice(DeviceId id)
Retrieve the device from team map.
|
Interface |
getInterface(DeviceId deviceId,
InterfaceId interfaceId)
Get an individual interface.
|
List<Interface> |
getInterfaces(DeviceId deviceId)
Get the interfaces for a specific device.
|
boolean |
isInitDone()
Returns the status of DataStore initialization.
|
void |
lock(DeviceId deviceId)
Lock the device for modification.
|
void |
notify(DeviceEvent event)
Notify local listeners of a device / interface event
|
void |
removeDevice(Device device)
Remove the device from teaming and persistence
|
void |
removeInterfaces(DeviceId deviceId)
Remove the interface attached to the device.
|
void |
setEventBroker(EventDispatchService dispatch)
Teamed device events will be sent to local listeners.
|
void |
setSize(long size)
Sets the size of this device store.
|
void |
unlock(DeviceId deviceId)
Unlock the device for modification.
|
void |
updateInterface(Interface netIf)
Update an individual interface in persistence and teaming.
|
void |
updateInterfaces(DeviceId deviceId,
List<Interface> toAdd,
List<Interface> toUpdate,
List<Interface> toRemove)
Update all interfaces to a device as one operation, but pre-separated
into new, update, and remove.
|
void setEventBroker(EventDispatchService dispatch)
dispatch
- event dispatch servicevoid notify(DeviceEvent event)
event
- action that occurredboolean addDevice(Device device)
device
- object to team / persistvoid removeDevice(Device device)
device
- object to removeSet<Device> getDevice(DeviceFilter filter)
filter
- to apply, match method will not be usedDevice getDevice(DeviceId id)
id
- keyvoid lock(DeviceId deviceId)
deviceId
- device to lockvoid unlock(DeviceId deviceId)
deviceId
- device to unlockvoid updateInterfaces(DeviceId deviceId, List<Interface> toAdd, List<Interface> toUpdate, List<Interface> toRemove)
deviceId
- Device that the interfaces are attachedtoAdd
- interfaces to addtoUpdate
- interfaces to updatetoRemove
- interfaces to removevoid updateInterface(Interface netIf)
netIf
- interface to updatevoid removeInterfaces(DeviceId deviceId)
deviceId
- device referenceList<Interface> getInterfaces(DeviceId deviceId)
deviceId
- device referenceInterface getInterface(DeviceId deviceId, InterfaceId interfaceId)
deviceId
- device referenceinterfaceId
- interface referencevoid baseSystem(boolean baseSystem)
baseSystem
- true to load from persist, false to load from teamboolean isInitDone()
void setSize(long size)
size
- the new store sizeCopyright © 2015. All Rights Reserved.