@Test public final void testGetEgressLinks() { final ConnectPoint d1P1 = new ConnectPoint(DID1, P1); final ConnectPoint d2P2 = new ConnectPoint(DID2, P2); LinkKey linkId1 = LinkKey.linkKey(d1P1, d2P2); LinkKey linkId2 = LinkKey.linkKey(d2P2, d1P1); LinkKey linkId3 = LinkKey.linkKey(new ConnectPoint(DID1, P2), new ConnectPoint(DID2, P3)); putLink(linkId1, DIRECT); putLink(linkId2, DIRECT); putLink(linkId3, DIRECT); Set<Link> links1 = linkStore.getEgressLinks(d1P1); assertEquals(1, links1.size()); assertLink(linkId1, DIRECT, links1.iterator().next()); Set<Link> links2 = linkStore.getEgressLinks(d2P2); assertEquals(1, links2.size()); assertLink(linkId2, DIRECT, links2.iterator().next()); }
@Override public Set<Link> getEgressLinks(ConnectPoint src) { return filter(links.values(), link -> src.equals(link.src())); }
ECLinkStore extends AbstractStore<LinkEvent, LinkStoreDelegate> implements LinkStore { @Override public Set<Link> getEgressLinks(ConnectPoint src) { return filter(links.values(), link -> src.equals(link.src())); } }
ECLinkStore extends AbstractStore<LinkEvent, LinkStoreDelegate> implements LinkStore { @Override public Set<Link> getEgressLinks(ConnectPoint src) { return filter(links.values(), link -> src.equals(link.src())); }  }
ECLinkStore extends AbstractStore<LinkEvent, LinkStoreDelegate> implements LinkStore { @Override public Set<Link> getEgressLinks(ConnectPoint src) { return filter(links.values(), link -> src.equals(link.src())); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getLinkCount(); @Override Iterable<Link> getLinks(); @Override Set<Link> getDeviceEgressLinks(DeviceId deviceId); @Override Set<Link> getDeviceIngressLinks(DeviceId deviceId); @Override Link getLink(ConnectPoint src, ConnectPoint dst); @Override Set<Link> getEgressLinks(ConnectPoint src); @Override Set<Link> getIngressLinks(ConnectPoint dst); @Override LinkEvent createOrUpdateLink(ProviderId providerId,
                                        LinkDescription linkDescription); @Override LinkEvent removeOrDownLink(ConnectPoint src, ConnectPoint dst); @Override LinkEvent removeLink(ConnectPoint src, ConnectPoint dst); }
ECLinkStore extends AbstractStore<LinkEvent, LinkStoreDelegate> implements LinkStore { @Override public Set<Link> getEgressLinks(ConnectPoint src) { return filter(links.values(), link -> src.equals(link.src())); }  @Activate void activate(); @Deactivate void deactivate(); @Override int getLinkCount(); @Override Iterable<Link> getLinks(); @Override Set<Link> getDeviceEgressLinks(DeviceId deviceId); @Override Set<Link> getDeviceIngressLinks(DeviceId deviceId); @Override Link getLink(ConnectPoint src, ConnectPoint dst); @Override Set<Link> getEgressLinks(ConnectPoint src); @Override Set<Link> getIngressLinks(ConnectPoint dst); @Override LinkEvent createOrUpdateLink(ProviderId providerId,
                                        LinkDescription linkDescription); @Override LinkEvent removeOrDownLink(ConnectPoint src, ConnectPoint dst); @Override LinkEvent removeLink(ConnectPoint src, ConnectPoint dst);  }