@Test public void testGetBindings() { final SxpBindingFields localBinding = getBinding("1.1.1.1/32", 10); final SxpBindingFields networkBinding = getNetworkBinding("2.2.2.2/32", 20); assertBindings(database.addBindings(mergeBindings(localBinding, networkBinding)), mergeBindings(localBinding, networkBinding)); assertBindings(database.getBindings(), mergeBindings(localBinding, networkBinding)); assertBindings(database.getBindings(BindingOriginsConfig.LOCAL_ORIGIN), Collections.singletonList(localBinding)); assertBindings(database.getBindings(BindingOriginsConfig.NETWORK_ORIGIN), Collections.singletonList(networkBinding)); }
@Override public synchronized List<MasterDatabaseBinding> getBindings() { List<MasterDatabaseBinding> bindings = new ArrayList<>(); org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.databases.fields.MasterDatabase database = datastoreAccess.readSynchronous(getIdentifierBuilder().build(), LogicalDatastoreType.OPERATIONAL); if (database != null && database.getMasterDatabaseBinding() != null && !database.getMasterDatabaseBinding().isEmpty()) { bindings.addAll(database.getMasterDatabaseBinding()); } return bindings; }
MasterDatastoreImpl extends MasterDatabase { @Override public synchronized List<MasterDatabaseBinding> getBindings() { List<MasterDatabaseBinding> bindings = new ArrayList<>(); org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.databases.fields.MasterDatabase database = datastoreAccess.readSynchronous(getIdentifierBuilder().build(), LogicalDatastoreType.OPERATIONAL); if (database != null && database.getMasterDatabaseBinding() != null && !database.getMasterDatabaseBinding().isEmpty()) { bindings.addAll(database.getMasterDatabaseBinding()); } return bindings; } }
MasterDatastoreImpl extends MasterDatabase { @Override public synchronized List<MasterDatabaseBinding> getBindings() { List<MasterDatabaseBinding> bindings = new ArrayList<>(); org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.databases.fields.MasterDatabase database = datastoreAccess.readSynchronous(getIdentifierBuilder().build(), LogicalDatastoreType.OPERATIONAL); if (database != null && database.getMasterDatabaseBinding() != null && !database.getMasterDatabaseBinding().isEmpty()) { bindings.addAll(database.getMasterDatabaseBinding()); } return bindings; } MasterDatastoreImpl(DatastoreAccess datastoreAccess, String nodeId, String domain); }
MasterDatastoreImpl extends MasterDatabase { @Override public synchronized List<MasterDatabaseBinding> getBindings() { List<MasterDatabaseBinding> bindings = new ArrayList<>(); org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.databases.fields.MasterDatabase database = datastoreAccess.readSynchronous(getIdentifierBuilder().build(), LogicalDatastoreType.OPERATIONAL); if (database != null && database.getMasterDatabaseBinding() != null && !database.getMasterDatabaseBinding().isEmpty()) { bindings.addAll(database.getMasterDatabaseBinding()); } return bindings; } MasterDatastoreImpl(DatastoreAccess datastoreAccess, String nodeId, String domain); @Override void initDBPropagatingListener(BindingDispatcher dispatcher, org.opendaylight.sxp.core.SxpDomain domain); DatastoreAccess getDatastoreAccess(); @Override synchronized List<MasterDatabaseBinding> addBindings(List<T> bindings); @Override synchronized List<MasterDatabaseBinding> getBindings(); @Override synchronized List<MasterDatabaseBinding> getBindings(OriginType origin); @Override synchronized List<MasterDatabaseBinding> deleteBindings(List<T> bindings); @Override void close(); }
MasterDatastoreImpl extends MasterDatabase { @Override public synchronized List<MasterDatabaseBinding> getBindings() { List<MasterDatabaseBinding> bindings = new ArrayList<>(); org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.node.rev160308.sxp.databases.fields.MasterDatabase database = datastoreAccess.readSynchronous(getIdentifierBuilder().build(), LogicalDatastoreType.OPERATIONAL); if (database != null && database.getMasterDatabaseBinding() != null && !database.getMasterDatabaseBinding().isEmpty()) { bindings.addAll(database.getMasterDatabaseBinding()); } return bindings; } MasterDatastoreImpl(DatastoreAccess datastoreAccess, String nodeId, String domain); @Override void initDBPropagatingListener(BindingDispatcher dispatcher, org.opendaylight.sxp.core.SxpDomain domain); DatastoreAccess getDatastoreAccess(); @Override synchronized List<MasterDatabaseBinding> addBindings(List<T> bindings); @Override synchronized List<MasterDatabaseBinding> getBindings(); @Override synchronized List<MasterDatabaseBinding> getBindings(OriginType origin); @Override synchronized List<MasterDatabaseBinding> deleteBindings(List<T> bindings); @Override void close();  }