@Test public void testSetVersion() throws Exception { ArgumentCaptor<Connection> captor = ArgumentCaptor.forClass(Connection.class); connection.setVersion(Version.Version1); assertEquals(Version.Version1, connection.getVersion()); verify(writeTransaction, atLeastOnce()).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), captor.capture()); assertEquals(Version.Version1, captor.getValue().getVersion()); }
@Override protected void setVersion(Version version) { super.setVersion(version); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setVersion(version).build(), LogicalDatastoreType.OPERATIONAL, true); } }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setVersion(Version version) { super.setVersion(version); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setVersion(version).build(), LogicalDatastoreType.OPERATIONAL, true); } } }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setVersion(Version version) { super.setVersion(version); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setVersion(version).build(), LogicalDatastoreType.OPERATIONAL, true); } } private  SxpDatastoreConnection(DatastoreAccess datastoreAccess, SxpNode owner, Connection connection, String domain); }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setVersion(Version version) { super.setVersion(version); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setVersion(version).build(), LogicalDatastoreType.OPERATIONAL, true); } } private  SxpDatastoreConnection(DatastoreAccess datastoreAccess, SxpNode owner, Connection connection, String domain); static SxpDatastoreConnection create(DatastoreAccess datastoreAccess, SxpNode owner, Connection connection,
            String domain); @Override void setNodeIdRemote(NodeId remoteNodeId); @Override void setUpdateOrKeepaliveMessageTimestamp(); @Override void shutdown(); }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setVersion(Version version) { super.setVersion(version); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setVersion(version).build(), LogicalDatastoreType.OPERATIONAL, true); } } private  SxpDatastoreConnection(DatastoreAccess datastoreAccess, SxpNode owner, Connection connection, String domain); static SxpDatastoreConnection create(DatastoreAccess datastoreAccess, SxpNode owner, Connection connection,
            String domain); @Override void setNodeIdRemote(NodeId remoteNodeId); @Override void setUpdateOrKeepaliveMessageTimestamp(); @Override void shutdown();  }