@Test public void updateLink() { addLink(DID1, P1, DID2, P2, DIRECT); addLink(DID2, P2, DID1, P1, INDIRECT); assertEquals("incorrect link count", 2, service.getLinkCount()); providerService.linkDetected(new DefaultLinkDescription(cp(DID2, P2), cp(DID1, P1), DIRECT)); validateEvents(LINK_UPDATED); assertEquals("incorrect link count", 2, service.getLinkCount()); providerService.linkDetected(new DefaultLinkDescription(cp(DID2, P2), cp(DID1, P1), INDIRECT)); providerService.linkDetected(new DefaultLinkDescription(cp(DID2, P2), cp(DID1, P1), DIRECT)); assertEquals("no events expected", 0, listener.events.size()); }
@Override public int getLinkCount() { checkPermission(LINK_READ); return store.getLinkCount(); }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public int getLinkCount() { checkPermission(LINK_READ); return store.getLinkCount(); } }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public int getLinkCount() { checkPermission(LINK_READ); return store.getLinkCount(); }  }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public int getLinkCount() { checkPermission(LINK_READ); return store.getLinkCount(); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getLinkCount(); @Override Iterable<Link> getLinks(); @Override Iterable<Link> getActiveLinks(); @Override Set<Link> getDeviceLinks(DeviceId deviceId); @Override Set<Link> getDeviceEgressLinks(DeviceId deviceId); @Override Set<Link> getDeviceIngressLinks(DeviceId deviceId); @Override Set<Link> getLinks(ConnectPoint connectPoint); @Override Set<Link> getEgressLinks(ConnectPoint connectPoint); @Override Set<Link> getIngressLinks(ConnectPoint connectPoint); @Override Link getLink(ConnectPoint src, ConnectPoint dst); @Override void removeLinks(ConnectPoint connectPoint); @Override void removeLinks(DeviceId deviceId); @Override void removeLink(ConnectPoint src, ConnectPoint dst); }
LinkManager extends AbstractListenerProviderRegistry<LinkEvent, LinkListener, LinkProvider, LinkProviderService> implements LinkService, LinkAdminService, LinkProviderRegistry { @Override public int getLinkCount() { checkPermission(LINK_READ); return store.getLinkCount(); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getLinkCount(); @Override Iterable<Link> getLinks(); @Override Iterable<Link> getActiveLinks(); @Override Set<Link> getDeviceLinks(DeviceId deviceId); @Override Set<Link> getDeviceEgressLinks(DeviceId deviceId); @Override Set<Link> getDeviceIngressLinks(DeviceId deviceId); @Override Set<Link> getLinks(ConnectPoint connectPoint); @Override Set<Link> getEgressLinks(ConnectPoint connectPoint); @Override Set<Link> getIngressLinks(ConnectPoint connectPoint); @Override Link getLink(ConnectPoint src, ConnectPoint dst); @Override void removeLinks(ConnectPoint connectPoint); @Override void removeLinks(DeviceId deviceId); @Override void removeLink(ConnectPoint src, ConnectPoint dst);  }