public interface DeviceStore extends Store<DeviceEvent,DeviceStoreDelegate>
| Modifier and Type | Method and Description |
|---|---|
DeviceEvent |
createOrUpdateDevice(ProviderId providerId,
DeviceId deviceId,
DeviceDescription deviceDescription)
Creates a new infrastructure device, or updates an existing one using
the supplied device description.
|
int |
getAvailableDeviceCount()
Returns the number of currently available devices known to the system.
|
java.lang.Iterable<Device> |
getAvailableDevices()
Returns an iterable collection of all devices currently available to the system.
|
default PortStatistics |
getDeltaStatisticsForPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port delta statistics of the specified device and port.
|
Device |
getDevice(DeviceId deviceId)
Returns the device with the specified identifier.
|
int |
getDeviceCount()
Returns the number of devices known to the system.
|
java.lang.Iterable<Device> |
getDevices()
Returns an iterable collection of all devices known to the system.
|
Port |
getPort(DeviceId deviceId,
PortNumber portNumber)
Returns the specified device port.
|
java.util.List<PortStatistics> |
getPortDeltaStatistics(DeviceId deviceId)
Returns the list of delta port statistics of the specified device.
|
PortDescription |
getPortDescription(ProviderId providerId,
DeviceId deviceId,
PortNumber portNumber)
Returns the specified device port description.
|
java.util.stream.Stream<PortDescription> |
getPortDescriptions(ProviderId providerId,
DeviceId deviceId)
Returns the stream of port descriptions that belong to the specified device.
|
java.util.List<Port> |
getPorts(DeviceId deviceId)
Returns the list of ports that belong to the specified device.
|
java.util.List<PortStatistics> |
getPortStatistics(DeviceId deviceId)
Returns the list of port statistics of the specified device.
|
default PortStatistics |
getStatisticsForPort(DeviceId deviceId,
PortNumber portNumber)
Returns the port statistics of the specified device and port.
|
boolean |
isAvailable(DeviceId deviceId)
Indicates whether the specified device is available/online.
|
DeviceEvent |
markOffline(DeviceId deviceId)
Removes the specified infrastructure device.
|
boolean |
markOnline(DeviceId deviceId)
Marks the device as available.
|
DeviceEvent |
removeDevice(DeviceId deviceId)
Administratively removes the specified device from the store.
|
java.util.List<DeviceEvent> |
updatePorts(ProviderId providerId,
DeviceId deviceId,
java.util.List<PortDescription> portDescriptions)
Updates the ports of the specified infrastructure device using the given
list of port descriptions.
|
DeviceEvent |
updatePortStatistics(ProviderId providerId,
DeviceId deviceId,
java.util.Collection<PortStatistics> portStats)
Updates the port statistics of the specified device using the give port
statistics.
|
DeviceEvent |
updatePortStatus(ProviderId providerId,
DeviceId deviceId,
PortDescription portDescription)
Updates the port status of the specified infrastructure device using the
given port description.
|
hasDelegate, setDelegate, unsetDelegateint getDeviceCount()
int getAvailableDeviceCount()
java.lang.Iterable<Device> getDevices()
java.lang.Iterable<Device> getAvailableDevices()
Device getDevice(DeviceId deviceId)
deviceId - device identifierDeviceEvent createOrUpdateDevice(ProviderId providerId, DeviceId deviceId, DeviceDescription deviceDescription)
providerId - provider identifierdeviceId - device identifierdeviceDescription - device descriptionDeviceEvent markOffline(DeviceId deviceId)
deviceId - device identifierboolean markOnline(DeviceId deviceId)
deviceId - device identifierjava.util.List<DeviceEvent> updatePorts(ProviderId providerId, DeviceId deviceId, java.util.List<PortDescription> portDescriptions)
providerId - provider identifierdeviceId - device identifierportDescriptions - list of port descriptionsDeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId, PortDescription portDescription)
providerId - provider identifierdeviceId - device identifierportDescription - port descriptionjava.util.List<Port> getPorts(DeviceId deviceId)
deviceId - device identifierjava.util.stream.Stream<PortDescription> getPortDescriptions(ProviderId providerId, DeviceId deviceId)
providerId - provider identifierdeviceId - device identifierDeviceEvent updatePortStatistics(ProviderId providerId, DeviceId deviceId, java.util.Collection<PortStatistics> portStats)
providerId - provider identifierdeviceId - device identifierportStats - list of port statisticsjava.util.List<PortStatistics> getPortStatistics(DeviceId deviceId)
deviceId - device identifierdefault PortStatistics getStatisticsForPort(DeviceId deviceId, PortNumber portNumber)
deviceId - device identifierportNumber - port identifierjava.util.List<PortStatistics> getPortDeltaStatistics(DeviceId deviceId)
deviceId - device identifierdefault PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber portNumber)
deviceId - device identifierportNumber - port identifierPort getPort(DeviceId deviceId, PortNumber portNumber)
deviceId - device identifierportNumber - port numberPortDescription getPortDescription(ProviderId providerId, DeviceId deviceId, PortNumber portNumber)
providerId - provider identifierdeviceId - device identifierportNumber - port numberboolean isAvailable(DeviceId deviceId)
deviceId - device identifierDeviceEvent removeDevice(DeviceId deviceId)
deviceId - device to be removed