public class GossipDeviceStore
extends org.onosproject.store.AbstractStore<org.onosproject.net.device.DeviceEvent,org.onosproject.net.device.DeviceStoreDelegate>
implements org.onosproject.net.device.DeviceStore
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.store.cluster.messaging.ClusterCommunicationService |
clusterCommunicator |
protected org.onosproject.cluster.ClusterService |
clusterService |
protected org.onosproject.net.device.DeviceClockService |
deviceClockService |
protected org.onosproject.mastership.MastershipService |
mastershipService |
protected static org.onosproject.store.service.Serializer |
SERIALIZER |
protected org.onosproject.store.service.StorageService |
storageService |
| Constructor and Description |
|---|
GossipDeviceStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
org.onosproject.net.device.PortStatistics |
calcDeltaStats(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.device.PortStatistics prvStats,
org.onosproject.net.device.PortStatistics newStats)
Calculate delta statistics by subtracting previous from new statistics.
|
org.onosproject.net.device.DeviceEvent |
createOrUpdateDevice(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.device.DeviceDescription deviceDescription) |
void |
deactivate() |
int |
getAvailableDeviceCount() |
Iterable<org.onosproject.net.Device> |
getAvailableDevices() |
org.onosproject.net.device.PortStatistics |
getDeltaStatisticsForPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber) |
org.onosproject.net.Device |
getDevice(org.onosproject.net.DeviceId deviceId) |
int |
getDeviceCount() |
Iterable<org.onosproject.net.Device> |
getDevices() |
org.onosproject.net.Port |
getPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber) |
List<org.onosproject.net.device.PortStatistics> |
getPortDeltaStatistics(org.onosproject.net.DeviceId deviceId) |
org.onosproject.net.device.PortDescription |
getPortDescription(org.onosproject.net.provider.ProviderId pid,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber) |
Stream<org.onosproject.net.device.PortDescription> |
getPortDescriptions(org.onosproject.net.provider.ProviderId pid,
org.onosproject.net.DeviceId deviceId) |
List<org.onosproject.net.Port> |
getPorts(org.onosproject.net.DeviceId deviceId) |
List<org.onosproject.net.device.PortStatistics> |
getPortStatistics(org.onosproject.net.DeviceId deviceId) |
org.onosproject.net.device.PortStatistics |
getStatisticsForPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber) |
boolean |
isAvailable(org.onosproject.net.DeviceId deviceId) |
org.onosproject.net.device.DeviceEvent |
markOffline(org.onosproject.net.DeviceId deviceId) |
org.onosproject.net.device.DeviceEvent |
markOnline(org.onosproject.net.DeviceId deviceId) |
org.onosproject.net.device.DeviceEvent |
removeDevice(org.onosproject.net.DeviceId deviceId) |
List<org.onosproject.net.device.DeviceEvent> |
updatePorts(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
List<org.onosproject.net.device.PortDescription> portDescriptions) |
org.onosproject.net.device.DeviceEvent |
updatePortStatistics(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
Collection<org.onosproject.net.device.PortStatistics> newStatsCollection) |
org.onosproject.net.device.DeviceEvent |
updatePortStatus(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.device.PortDescription portDescription) |
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegateprotected org.onosproject.net.device.DeviceClockService deviceClockService
protected org.onosproject.store.service.StorageService storageService
protected org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator
protected org.onosproject.cluster.ClusterService clusterService
protected org.onosproject.mastership.MastershipService mastershipService
protected static final org.onosproject.store.service.Serializer SERIALIZER
public void activate()
public void deactivate()
public int getDeviceCount()
getDeviceCount in interface org.onosproject.net.device.DeviceStorepublic int getAvailableDeviceCount()
getAvailableDeviceCount in interface org.onosproject.net.device.DeviceStorepublic Iterable<org.onosproject.net.Device> getDevices()
getDevices in interface org.onosproject.net.device.DeviceStorepublic Iterable<org.onosproject.net.Device> getAvailableDevices()
getAvailableDevices in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.Device getDevice(org.onosproject.net.DeviceId deviceId)
getDevice in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.DeviceEvent createOrUpdateDevice(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.device.DeviceDescription deviceDescription)
createOrUpdateDevice in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.DeviceEvent markOffline(org.onosproject.net.DeviceId deviceId)
markOffline in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.DeviceEvent markOnline(org.onosproject.net.DeviceId deviceId)
markOnline in interface org.onosproject.net.device.DeviceStorepublic List<org.onosproject.net.device.DeviceEvent> updatePorts(org.onosproject.net.provider.ProviderId providerId, org.onosproject.net.DeviceId deviceId, List<org.onosproject.net.device.PortDescription> portDescriptions)
updatePorts in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.DeviceEvent updatePortStatus(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.device.PortDescription portDescription)
updatePortStatus in interface org.onosproject.net.device.DeviceStorepublic List<org.onosproject.net.Port> getPorts(org.onosproject.net.DeviceId deviceId)
getPorts in interface org.onosproject.net.device.DeviceStorepublic Stream<org.onosproject.net.device.PortDescription> getPortDescriptions(org.onosproject.net.provider.ProviderId pid, org.onosproject.net.DeviceId deviceId)
getPortDescriptions in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.DeviceEvent updatePortStatistics(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
Collection<org.onosproject.net.device.PortStatistics> newStatsCollection)
updatePortStatistics in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.PortStatistics calcDeltaStats(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.device.PortStatistics prvStats,
org.onosproject.net.device.PortStatistics newStats)
deviceId - device identifierprvStats - previous port statisticsnewStats - new port statisticspublic List<org.onosproject.net.device.PortStatistics> getPortStatistics(org.onosproject.net.DeviceId deviceId)
getPortStatistics in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.PortStatistics getStatisticsForPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber)
getStatisticsForPort in interface org.onosproject.net.device.DeviceStorepublic List<org.onosproject.net.device.PortStatistics> getPortDeltaStatistics(org.onosproject.net.DeviceId deviceId)
getPortDeltaStatistics in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.PortStatistics getDeltaStatisticsForPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber)
getDeltaStatisticsForPort in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.Port getPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber)
getPort in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.PortDescription getPortDescription(org.onosproject.net.provider.ProviderId pid,
org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber)
getPortDescription in interface org.onosproject.net.device.DeviceStorepublic boolean isAvailable(org.onosproject.net.DeviceId deviceId)
isAvailable in interface org.onosproject.net.device.DeviceStorepublic org.onosproject.net.device.DeviceEvent removeDevice(org.onosproject.net.DeviceId deviceId)
removeDevice in interface org.onosproject.net.device.DeviceStore