@Test public void testPutBindings() { NodeId nodeId = new NodeId("127.0.0.1"); boolean resultOfPut = database.putBindings(nodeId, BindingDatabase.BindingType.ActiveBindings, Collections.EMPTY_LIST); assertTrue(resultOfPut); boolean resultOfPut2 = database.putBindings(nodeId, BindingDatabase.BindingType.ActiveBindings, Collections.EMPTY_LIST); assertTrue(!resultOfPut2); }
@Override protected boolean putBindings(NodeId nodeId, BindingDatabase.BindingType bindingType, Collection<SxpDatabaseBinding> bindings) { if (this.bindings.get(bindingType).get(nodeId) == null) { return this.bindings.get(bindingType).put(nodeId, bindings) == null; } return this.bindings.get(bindingType).get(nodeId).addAll(bindings); }
SxpDatabaseImpl extends org.opendaylight.sxp.util.database.SxpDatabase { @Override protected boolean putBindings(NodeId nodeId, BindingDatabase.BindingType bindingType, Collection<SxpDatabaseBinding> bindings) { if (this.bindings.get(bindingType).get(nodeId) == null) { return this.bindings.get(bindingType).put(nodeId, bindings) == null; } return this.bindings.get(bindingType).get(nodeId).addAll(bindings); } }
SxpDatabaseImpl extends org.opendaylight.sxp.util.database.SxpDatabase { @Override protected boolean putBindings(NodeId nodeId, BindingDatabase.BindingType bindingType, Collection<SxpDatabaseBinding> bindings) { if (this.bindings.get(bindingType).get(nodeId) == null) { return this.bindings.get(bindingType).put(nodeId, bindings) == null; } return this.bindings.get(bindingType).get(nodeId).addAll(bindings); } SxpDatabaseImpl(); }
SxpDatabaseImpl extends org.opendaylight.sxp.util.database.SxpDatabase { @Override protected boolean putBindings(NodeId nodeId, BindingDatabase.BindingType bindingType, Collection<SxpDatabaseBinding> bindings) { if (this.bindings.get(bindingType).get(nodeId) == null) { return this.bindings.get(bindingType).put(nodeId, bindings) == null; } return this.bindings.get(bindingType).get(nodeId).addAll(bindings); } SxpDatabaseImpl(); @Override void close(); }
SxpDatabaseImpl extends org.opendaylight.sxp.util.database.SxpDatabase { @Override protected boolean putBindings(NodeId nodeId, BindingDatabase.BindingType bindingType, Collection<SxpDatabaseBinding> bindings) { if (this.bindings.get(bindingType).get(nodeId) == null) { return this.bindings.get(bindingType).put(nodeId, bindings) == null; } return this.bindings.get(bindingType).get(nodeId).addAll(bindings); } SxpDatabaseImpl(); @Override void close();  }