@Test public void testGetPeerGroup() throws Exception { assertNull(node.getPeerGroup("TEST")); SxpPeerGroup peerGroup = getGroup("TEST", new ArrayList<SxpFilter>(), null); node.addPeerGroup(peerGroup); assertEquals(peerGroup, node.getPeerGroup("TEST")); peerGroup = getGroup("TEST3", getFilters(FilterType.Inbound, FilterType.Outbound), null); node.addPeerGroup(peerGroup); assertEquals(peerGroup, node.getPeerGroup("TEST3")); assertNotEquals(peerGroup, node.getPeerGroup("TEST")); }
private List<SxpPeerGroup> getPeerGroup(SxpConnection connection) { List<SxpPeerGroup> sxpPeerGroups = new ArrayList<>(); synchronized (peerGroupMap) { for (SxpPeerGroupBuilder peerGroup : peerGroupMap.values()) { if (peerGroup.getSxpPeers().getSxpPeer() == null || peerGroup.getSxpPeers().getSxpPeer().isEmpty()) { sxpPeerGroups.add(peerGroup.build()); continue; } for (SxpPeer peer : peerGroup.getSxpPeers().getSxpPeer()) { InetAddress address = InetAddresses.forString(Search.getAddress(peer.getPeerAddress())); if (address.equals(connection.getDestination().getAddress())) { sxpPeerGroups.add(peerGroup.build()); } } } } return sxpPeerGroups; }
SxpNode { private List<SxpPeerGroup> getPeerGroup(SxpConnection connection) { List<SxpPeerGroup> sxpPeerGroups = new ArrayList<>(); synchronized (peerGroupMap) { for (SxpPeerGroupBuilder peerGroup : peerGroupMap.values()) { if (peerGroup.getSxpPeers().getSxpPeer() == null || peerGroup.getSxpPeers().getSxpPeer().isEmpty()) { sxpPeerGroups.add(peerGroup.build()); continue; } for (SxpPeer peer : peerGroup.getSxpPeers().getSxpPeer()) { InetAddress address = InetAddresses.forString(Search.getAddress(peer.getPeerAddress())); if (address.equals(connection.getDestination().getAddress())) { sxpPeerGroups.add(peerGroup.build()); } } } } return sxpPeerGroups; } }
SxpNode { private List<SxpPeerGroup> getPeerGroup(SxpConnection connection) { List<SxpPeerGroup> sxpPeerGroups = new ArrayList<>(); synchronized (peerGroupMap) { for (SxpPeerGroupBuilder peerGroup : peerGroupMap.values()) { if (peerGroup.getSxpPeers().getSxpPeer() == null || peerGroup.getSxpPeers().getSxpPeer().isEmpty()) { sxpPeerGroups.add(peerGroup.build()); continue; } for (SxpPeer peer : peerGroup.getSxpPeers().getSxpPeer()) { InetAddress address = InetAddresses.forString(Search.getAddress(peer.getPeerAddress())); if (address.equals(connection.getDestination().getAddress())) { sxpPeerGroups.add(peerGroup.build()); } } } } return sxpPeerGroups; } protected  SxpNode(NodeId nodeId, SxpNodeIdentity node, ThreadsWorker worker); }
SxpNode { private List<SxpPeerGroup> getPeerGroup(SxpConnection connection) { List<SxpPeerGroup> sxpPeerGroups = new ArrayList<>(); synchronized (peerGroupMap) { for (SxpPeerGroupBuilder peerGroup : peerGroupMap.values()) { if (peerGroup.getSxpPeers().getSxpPeer() == null || peerGroup.getSxpPeers().getSxpPeer().isEmpty()) { sxpPeerGroups.add(peerGroup.build()); continue; } for (SxpPeer peer : peerGroup.getSxpPeers().getSxpPeer()) { InetAddress address = InetAddresses.forString(Search.getAddress(peer.getPeerAddress())); if (address.equals(connection.getDestination().getAddress())) { sxpPeerGroups.add(peerGroup.build()); } } } } return sxpPeerGroups; } protected  SxpNode(NodeId nodeId, SxpNodeIdentity node, ThreadsWorker worker); static SxpNode createInstance(NodeId nodeId, SxpNodeIdentity node); static SxpNode createInstance(NodeId nodeId, SxpNodeIdentity node, MasterDatabaseInf masterDatabase,
            SxpDatabaseInf sxpDatabase); static SxpNode createInstance(NodeId nodeId, SxpNodeIdentity node, MasterDatabaseInf masterDatabase,
            SxpDatabaseInf sxpDatabase, ThreadsWorker worker); SxpConnection addConnection(SxpConnection connection); boolean addPeerGroup(SxpPeerGroup peerGroup); SxpPeerGroup getPeerGroup(String peerGroupName); SxpPeerGroup removePeerGroup(String peerGroupName); Collection<SxpPeerGroup> getPeerGroups(); boolean addFilterToPeerGroup(String peerGroupName, SxpFilter sxpFilter); SxpFilter updateFilterInPeerGroup(String peerGroupName, SxpFilter newFilter); boolean removeFilterFromPeerGroup(String peerGroupName, FilterType filterType, FilterSpecific specific); boolean addDomain(
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain); boolean addDomain(
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain,
            MasterDatabaseInf masterDB,
            SxpDatabaseInf sxpDB); SxpDomain removeDomain(String domainName); SxpDomain getDomain(String name); Collection<SxpDomain> getDomains(); boolean addFilterToDomain(String domain, DomainFilter filter); SxpBindingFilter removeFilterFromDomain(String domain, FilterSpecific specific, String filterName); boolean updateDomainFilter(String domain, DomainFilter newFilter); @Deprecated void addConnection(Connection connection); SxpConnection addConnection(Connection connection, String domain); @Deprecated void addConnections(Connections connections); void addConnections(Connections connections, String domain); List<SxpConnection> getAllConnections(); List<SxpConnection> getAllConnections(String domain); InetAddress getSourceIp(); List<SxpConnection> getAllDeleteHoldDownConnections(); List<SxpConnection> getAllDeleteHoldDownConnections(String domain); List<SxpConnection> getAllOffConnections(); List<SxpConnection> getAllOffConnections(String domain); List<SxpConnection> getAllOnConnections(); List<SxpConnection> getAllOnConnections(String domain); @Deprecated List<SxpConnection> getAllOnListenerConnections(); List<SxpConnection> getAllOnListenerConnections(String domain); @Deprecated List<SxpConnection> getAllOnSpeakerConnections(); List<SxpConnection> getAllOnSpeakerConnections(String domain); @Deprecated MasterDatabaseInf getBindingMasterDatabase(); @Deprecated SxpDatabaseInf getBindingSxpDatabase(); MasterDatabaseInf getBindingMasterDatabase(String domainName); SxpDatabaseInf getBindingSxpDatabase(String domainName); SxpConnection getByAddress(final InetSocketAddress inetSocketAddress); @Deprecated SxpConnection getByPort(final int port); SxpConnection getConnection(SocketAddress socketAddress); int getExpansionQuantity(); int getHoldTime(); int getHoldTimeMax(); int getHoldTimeMin(); int getHoldTimeMinAcceptable(); int getKeepAliveTime(); String getName(); NodeId getNodeId(); String getPassword(); int getRetryOpenTime(); int getServerPort(); ListenableScheduledFuture<?> getTimer(TimerType timerType); Version getVersion(); boolean isEnabled(); synchronized ListenableFuture openConnections(); BindingDispatcher getSvcBindingDispatcher(); BindingHandler getSvcBindingHandler(); List<MasterDatabaseBinding> putBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); List<MasterDatabaseBinding> removeBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); SxpConnection removeConnection(InetSocketAddress destination); void setSecurity(
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.node.fields.Security security); void setRetryOpenTimerPeriod(int retryOpenTimerPeriod); void setMessagePartitionSize(int size); void setMessageMergeSize(int size); ThreadsWorker getWorker(); void shutdownConnections(); synchronized ListenableFuture<Boolean> shutdown(); synchronized ListenableFuture<Boolean> start(); void updateMD5keys(); SslContextFactory getSslContextFactory(); @Override String toString(); }
SxpNode { private List<SxpPeerGroup> getPeerGroup(SxpConnection connection) { List<SxpPeerGroup> sxpPeerGroups = new ArrayList<>(); synchronized (peerGroupMap) { for (SxpPeerGroupBuilder peerGroup : peerGroupMap.values()) { if (peerGroup.getSxpPeers().getSxpPeer() == null || peerGroup.getSxpPeers().getSxpPeer().isEmpty()) { sxpPeerGroups.add(peerGroup.build()); continue; } for (SxpPeer peer : peerGroup.getSxpPeers().getSxpPeer()) { InetAddress address = InetAddresses.forString(Search.getAddress(peer.getPeerAddress())); if (address.equals(connection.getDestination().getAddress())) { sxpPeerGroups.add(peerGroup.build()); } } } } return sxpPeerGroups; } protected  SxpNode(NodeId nodeId, SxpNodeIdentity node, ThreadsWorker worker); static SxpNode createInstance(NodeId nodeId, SxpNodeIdentity node); static SxpNode createInstance(NodeId nodeId, SxpNodeIdentity node, MasterDatabaseInf masterDatabase,
            SxpDatabaseInf sxpDatabase); static SxpNode createInstance(NodeId nodeId, SxpNodeIdentity node, MasterDatabaseInf masterDatabase,
            SxpDatabaseInf sxpDatabase, ThreadsWorker worker); SxpConnection addConnection(SxpConnection connection); boolean addPeerGroup(SxpPeerGroup peerGroup); SxpPeerGroup getPeerGroup(String peerGroupName); SxpPeerGroup removePeerGroup(String peerGroupName); Collection<SxpPeerGroup> getPeerGroups(); boolean addFilterToPeerGroup(String peerGroupName, SxpFilter sxpFilter); SxpFilter updateFilterInPeerGroup(String peerGroupName, SxpFilter newFilter); boolean removeFilterFromPeerGroup(String peerGroupName, FilterType filterType, FilterSpecific specific); boolean addDomain(
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain); boolean addDomain(
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.network.topology.topology.node.sxp.domains.SxpDomain domain,
            MasterDatabaseInf masterDB,
            SxpDatabaseInf sxpDB); SxpDomain removeDomain(String domainName); SxpDomain getDomain(String name); Collection<SxpDomain> getDomains(); boolean addFilterToDomain(String domain, DomainFilter filter); SxpBindingFilter removeFilterFromDomain(String domain, FilterSpecific specific, String filterName); boolean updateDomainFilter(String domain, DomainFilter newFilter); @Deprecated void addConnection(Connection connection); SxpConnection addConnection(Connection connection, String domain); @Deprecated void addConnections(Connections connections); void addConnections(Connections connections, String domain); List<SxpConnection> getAllConnections(); List<SxpConnection> getAllConnections(String domain); InetAddress getSourceIp(); List<SxpConnection> getAllDeleteHoldDownConnections(); List<SxpConnection> getAllDeleteHoldDownConnections(String domain); List<SxpConnection> getAllOffConnections(); List<SxpConnection> getAllOffConnections(String domain); List<SxpConnection> getAllOnConnections(); List<SxpConnection> getAllOnConnections(String domain); @Deprecated List<SxpConnection> getAllOnListenerConnections(); List<SxpConnection> getAllOnListenerConnections(String domain); @Deprecated List<SxpConnection> getAllOnSpeakerConnections(); List<SxpConnection> getAllOnSpeakerConnections(String domain); @Deprecated MasterDatabaseInf getBindingMasterDatabase(); @Deprecated SxpDatabaseInf getBindingSxpDatabase(); MasterDatabaseInf getBindingMasterDatabase(String domainName); SxpDatabaseInf getBindingSxpDatabase(String domainName); SxpConnection getByAddress(final InetSocketAddress inetSocketAddress); @Deprecated SxpConnection getByPort(final int port); SxpConnection getConnection(SocketAddress socketAddress); int getExpansionQuantity(); int getHoldTime(); int getHoldTimeMax(); int getHoldTimeMin(); int getHoldTimeMinAcceptable(); int getKeepAliveTime(); String getName(); NodeId getNodeId(); String getPassword(); int getRetryOpenTime(); int getServerPort(); ListenableScheduledFuture<?> getTimer(TimerType timerType); Version getVersion(); boolean isEnabled(); synchronized ListenableFuture openConnections(); BindingDispatcher getSvcBindingDispatcher(); BindingHandler getSvcBindingHandler(); List<MasterDatabaseBinding> putBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); List<MasterDatabaseBinding> removeBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); SxpConnection removeConnection(InetSocketAddress destination); void setSecurity(
            org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.node.fields.Security security); void setRetryOpenTimerPeriod(int retryOpenTimerPeriod); void setMessagePartitionSize(int size); void setMessageMergeSize(int size); ThreadsWorker getWorker(); void shutdownConnections(); synchronized ListenableFuture<Boolean> shutdown(); synchronized ListenableFuture<Boolean> start(); void updateMD5keys(); SslContextFactory getSslContextFactory(); @Override String toString(); static final String DEFAULT_DOMAIN; }