@Service
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 |
protected org.onosproject.mastership.MastershipTermService |
termService |
| 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() |
java.lang.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() |
java.lang.Iterable<org.onosproject.net.Device> |
getDevices() |
org.onosproject.net.Port |
getPort(org.onosproject.net.DeviceId deviceId,
org.onosproject.net.PortNumber portNumber) |
java.util.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) |
java.util.stream.Stream<org.onosproject.net.device.PortDescription> |
getPortDescriptions(org.onosproject.net.provider.ProviderId pid,
org.onosproject.net.DeviceId deviceId) |
java.util.List<org.onosproject.net.Port> |
getPorts(org.onosproject.net.DeviceId deviceId) |
java.util.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) |
boolean |
markOnline(org.onosproject.net.DeviceId deviceId) |
org.onosproject.net.device.DeviceEvent |
removeDevice(org.onosproject.net.DeviceId deviceId) |
java.util.List<org.onosproject.net.device.DeviceEvent> |
updatePorts(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
java.util.List<org.onosproject.net.device.PortDescription> portDescriptions) |
org.onosproject.net.device.DeviceEvent |
updatePortStatistics(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
java.util.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, unsetDelegate@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.device.DeviceClockService deviceClockService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterService clusterService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.mastership.MastershipService mastershipService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.mastership.MastershipTermService termService
protected static final org.onosproject.store.service.Serializer SERIALIZER
@Activate public void activate()
@Deactivate public void deactivate()
public int getDeviceCount()
getDeviceCount in interface org.onosproject.net.device.DeviceStorepublic int getAvailableDeviceCount()
getAvailableDeviceCount in interface org.onosproject.net.device.DeviceStorepublic java.lang.Iterable<org.onosproject.net.Device> getDevices()
getDevices in interface org.onosproject.net.device.DeviceStorepublic java.lang.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 boolean markOnline(org.onosproject.net.DeviceId deviceId)
markOnline in interface org.onosproject.net.device.DeviceStorepublic java.util.List<org.onosproject.net.device.DeviceEvent> updatePorts(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.DeviceId deviceId,
java.util.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 java.util.List<org.onosproject.net.Port> getPorts(org.onosproject.net.DeviceId deviceId)
getPorts in interface org.onosproject.net.device.DeviceStorepublic java.util.stream.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,
java.util.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 java.util.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 java.util.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