@Test public final void testGetDevices() { assertEquals("initialy empty", 0, Iterables.size(deviceStore.getDevices())); putDevice(DID1, SW1); putDevice(DID2, SW2); putDevice(DID1, SW1); assertEquals("expect 2 uniq devices", 2, Iterables.size(deviceStore.getDevices())); Map<DeviceId, Device> devices = new HashMap<>(); for (Device device : deviceStore.getDevices()) { devices.put(device.id(), device); } assertDevice(DID1, SW1, devices.get(DID1)); assertDevice(DID2, SW2, devices.get(DID2)); }
@Override public Iterable<Device> getDevices() { return Collections.unmodifiableCollection(devices.values()); }
GossipDeviceStore extends AbstractStore<DeviceEvent, DeviceStoreDelegate> implements DeviceStore { @Override public Iterable<Device> getDevices() { return Collections.unmodifiableCollection(devices.values()); } }
GossipDeviceStore extends AbstractStore<DeviceEvent, DeviceStoreDelegate> implements DeviceStore { @Override public Iterable<Device> getDevices() { return Collections.unmodifiableCollection(devices.values()); }  }
GossipDeviceStore extends AbstractStore<DeviceEvent, DeviceStoreDelegate> implements DeviceStore { @Override public Iterable<Device> getDevices() { return Collections.unmodifiableCollection(devices.values()); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getDeviceCount(); @Override Iterable<Device> getDevices(); @Override Iterable<Device> getAvailableDevices(); @Override Device getDevice(DeviceId deviceId); @Override synchronized DeviceEvent createOrUpdateDevice(ProviderId providerId,
                                                         DeviceId deviceId,
                                                         DeviceDescription deviceDescription); @Override DeviceEvent markOffline(DeviceId deviceId); @Override synchronized List<DeviceEvent> updatePorts(ProviderId providerId,
                                                      DeviceId deviceId,
                                                      List<PortDescription> portDescriptions); @Override synchronized DeviceEvent updatePortStatus(ProviderId providerId,
                                                     DeviceId deviceId,
                                                     PortDescription portDescription); @Override List<Port> getPorts(DeviceId deviceId); @Override DeviceEvent updatePortStatistics(ProviderId providerId, DeviceId deviceId,
                                            Collection<PortStatistics> newStatsCollection); PortStatistics calcDeltaStats(DeviceId deviceId, PortStatistics prvStats, PortStatistics newStats); @Override List<PortStatistics> getPortStatistics(DeviceId deviceId); @Override List<PortStatistics> getPortDeltaStatistics(DeviceId deviceId); @Override Port getPort(DeviceId deviceId, PortNumber portNumber); @Override boolean isAvailable(DeviceId deviceId); @Override synchronized DeviceEvent removeDevice(DeviceId deviceId); }
GossipDeviceStore extends AbstractStore<DeviceEvent, DeviceStoreDelegate> implements DeviceStore { @Override public Iterable<Device> getDevices() { return Collections.unmodifiableCollection(devices.values()); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getDeviceCount(); @Override Iterable<Device> getDevices(); @Override Iterable<Device> getAvailableDevices(); @Override Device getDevice(DeviceId deviceId); @Override synchronized DeviceEvent createOrUpdateDevice(ProviderId providerId,
                                                         DeviceId deviceId,
                                                         DeviceDescription deviceDescription); @Override DeviceEvent markOffline(DeviceId deviceId); @Override synchronized List<DeviceEvent> updatePorts(ProviderId providerId,
                                                      DeviceId deviceId,
                                                      List<PortDescription> portDescriptions); @Override synchronized DeviceEvent updatePortStatus(ProviderId providerId,
                                                     DeviceId deviceId,
                                                     PortDescription portDescription); @Override List<Port> getPorts(DeviceId deviceId); @Override DeviceEvent updatePortStatistics(ProviderId providerId, DeviceId deviceId,
                                            Collection<PortStatistics> newStatsCollection); PortStatistics calcDeltaStats(DeviceId deviceId, PortStatistics prvStats, PortStatistics newStats); @Override List<PortStatistics> getPortStatistics(DeviceId deviceId); @Override List<PortStatistics> getPortDeltaStatistics(DeviceId deviceId); @Override Port getPort(DeviceId deviceId, PortNumber portNumber); @Override boolean isAvailable(DeviceId deviceId); @Override synchronized DeviceEvent removeDevice(DeviceId deviceId);  }