@Test public void testSetState() throws Exception { ArgumentCaptor<Connection> captor = ArgumentCaptor.forClass(Connection.class); connection.setState(ConnectionState.DeleteHoldDown); assertEquals(ConnectionState.DeleteHoldDown, connection.getState()); verify(writeTransaction, atLeastOnce()).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), captor.capture()); assertEquals(ConnectionState.DeleteHoldDown, captor.getValue().getState()); }
@Override protected void setState(ConnectionState state) { super.setState(state); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setState(state).build(), LogicalDatastoreType.OPERATIONAL, true); } }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setState(ConnectionState state) { super.setState(state); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setState(state).build(), LogicalDatastoreType.OPERATIONAL, true); } } }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setState(ConnectionState state) { super.setState(state); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setState(state).build(), LogicalDatastoreType.OPERATIONAL, true); } } private  SxpDatastoreConnection(DatastoreAccess datastoreAccess, SxpNode owner, Connection connection, String domain); }
SxpDatastoreConnection extends org.opendaylight.sxp.core.SxpConnection { @Override protected void setState(ConnectionState state) { super.setState(state); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setState(state).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 setState(ConnectionState state) { super.setState(state); if (datastoreAccess != null) { datastoreAccess.checkAndMerge(getIdentifier(), new ConnectionBuilder().setPeerAddress(address).setTcpPort(port).setState(state).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();  }