@Test public void testAddDomain() throws Exception { assertTrue(node.addDomain(new SxpDomainBuilder().setDomainName("private").build())); assertFalse(node.addDomain(new SxpDomainBuilder().setDomainName("private").build())); assertTrue(node.addDomain(new SxpDomainBuilder().setDomainName("test").build())); }
@Override public boolean addDomain(SxpDomain domain) { Preconditions.checkNotNull(domain); Preconditions.checkNotNull(domain.getDomainName()); synchronized (sxpDomains) { if (!sxpDomains.containsKey(domain.getDomainName())) sxpDomains.put(domain.getDomainName(), org.opendaylight.sxp.core.SxpDomain.createInstance(this, domain.getDomainName(), new SxpDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()), new MasterDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()))); else return false; } return true; }
SxpDatastoreNode extends org.opendaylight.sxp.core.SxpNode implements AutoCloseable { @Override public boolean addDomain(SxpDomain domain) { Preconditions.checkNotNull(domain); Preconditions.checkNotNull(domain.getDomainName()); synchronized (sxpDomains) { if (!sxpDomains.containsKey(domain.getDomainName())) sxpDomains.put(domain.getDomainName(), org.opendaylight.sxp.core.SxpDomain.createInstance(this, domain.getDomainName(), new SxpDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()), new MasterDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()))); else return false; } return true; } }
SxpDatastoreNode extends org.opendaylight.sxp.core.SxpNode implements AutoCloseable { @Override public boolean addDomain(SxpDomain domain) { Preconditions.checkNotNull(domain); Preconditions.checkNotNull(domain.getDomainName()); synchronized (sxpDomains) { if (!sxpDomains.containsKey(domain.getDomainName())) sxpDomains.put(domain.getDomainName(), org.opendaylight.sxp.core.SxpDomain.createInstance(this, domain.getDomainName(), new SxpDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()), new MasterDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()))); else return false; } return true; } protected  SxpDatastoreNode(NodeId nodeId, DatastoreAccess datastoreAccess, SxpNodeIdentity node); }
SxpDatastoreNode extends org.opendaylight.sxp.core.SxpNode implements AutoCloseable { @Override public boolean addDomain(SxpDomain domain) { Preconditions.checkNotNull(domain); Preconditions.checkNotNull(domain.getDomainName()); synchronized (sxpDomains) { if (!sxpDomains.containsKey(domain.getDomainName())) sxpDomains.put(domain.getDomainName(), org.opendaylight.sxp.core.SxpDomain.createInstance(this, domain.getDomainName(), new SxpDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()), new MasterDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()))); else return false; } return true; } protected  SxpDatastoreNode(NodeId nodeId, DatastoreAccess datastoreAccess, SxpNodeIdentity node); static InstanceIdentifier<SxpNodeIdentity> getIdentifier(final String nodeId); static SxpDatastoreNode createInstance(NodeId nodeId, DatastoreAccess datastoreAccess,
            SxpNodeIdentity node); @Override boolean addDomain(SxpDomain domain); @Override SxpConnection addConnection(Connection connection, String domain); @Override List<MasterDatabaseBinding> putBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); @Override List<MasterDatabaseBinding> removeBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); DatastoreAccess getDatastoreAccess(); @Override synchronized ListenableFuture<Boolean> shutdown(); @Override void close(); }
SxpDatastoreNode extends org.opendaylight.sxp.core.SxpNode implements AutoCloseable { @Override public boolean addDomain(SxpDomain domain) { Preconditions.checkNotNull(domain); Preconditions.checkNotNull(domain.getDomainName()); synchronized (sxpDomains) { if (!sxpDomains.containsKey(domain.getDomainName())) sxpDomains.put(domain.getDomainName(), org.opendaylight.sxp.core.SxpDomain.createInstance(this, domain.getDomainName(), new SxpDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()), new MasterDatastoreImpl(DatastoreAccess.getInstance(datastoreAccess), nodeId, domain.getDomainName()))); else return false; } return true; } protected  SxpDatastoreNode(NodeId nodeId, DatastoreAccess datastoreAccess, SxpNodeIdentity node); static InstanceIdentifier<SxpNodeIdentity> getIdentifier(final String nodeId); static SxpDatastoreNode createInstance(NodeId nodeId, DatastoreAccess datastoreAccess,
            SxpNodeIdentity node); @Override boolean addDomain(SxpDomain domain); @Override SxpConnection addConnection(Connection connection, String domain); @Override List<MasterDatabaseBinding> putBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); @Override List<MasterDatabaseBinding> removeBindingsMasterDatabase(List<MasterDatabaseBinding> bindings,
            String domainName); DatastoreAccess getDatastoreAccess(); @Override synchronized ListenableFuture<Boolean> shutdown(); @Override void close();  }