@Test public void testReadException() throws Exception { when(transactionChain.newReadOnlyTransaction()).thenReturn(mock(ReadTransaction.class)); exception.expect(NullPointerException.class); access.read(null, null); }
public synchronized <T extends DataObject> FluentFuture<java.util.Optional<T>> read( final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType) { LOG.debug("Read {}", path); if (!checkParams(path, logicalDatastoreType)) { return FluentFutures.immediateCancelledFluentFuture(); } try (ReadTransaction transaction = bindingTransactionChain.newReadOnlyTransaction()) { return transaction.read(logicalDatastoreType, path); } }
DatastoreAccess implements AutoCloseable { public synchronized <T extends DataObject> FluentFuture<java.util.Optional<T>> read( final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType) { LOG.debug("Read {}", path); if (!checkParams(path, logicalDatastoreType)) { return FluentFutures.immediateCancelledFluentFuture(); } try (ReadTransaction transaction = bindingTransactionChain.newReadOnlyTransaction()) { return transaction.read(logicalDatastoreType, path); } } }
DatastoreAccess implements AutoCloseable { public synchronized <T extends DataObject> FluentFuture<java.util.Optional<T>> read( final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType) { LOG.debug("Read {}", path); if (!checkParams(path, logicalDatastoreType)) { return FluentFutures.immediateCancelledFluentFuture(); } try (ReadTransaction transaction = bindingTransactionChain.newReadOnlyTransaction()) { return transaction.read(logicalDatastoreType, path); } } private  DatastoreAccess(final DataBroker dataBroker); }
DatastoreAccess implements AutoCloseable { public synchronized <T extends DataObject> FluentFuture<java.util.Optional<T>> read( final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType) { LOG.debug("Read {}", path); if (!checkParams(path, logicalDatastoreType)) { return FluentFutures.immediateCancelledFluentFuture(); } try (ReadTransaction transaction = bindingTransactionChain.newReadOnlyTransaction()) { return transaction.read(logicalDatastoreType, path); } } private  DatastoreAccess(final DataBroker dataBroker); static DatastoreAccess getInstance(final DataBroker dataBroker); static DatastoreAccess getInstance(final DatastoreAccess datastoreAccess); synchronized FluentFuture<? extends CommitInfo> delete(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized FluentFuture<? extends CommitInfo> merge(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized FluentFuture<? extends CommitInfo> put(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized FluentFuture<java.util.Optional<T>> read(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized boolean mergeSynchronous(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized boolean putSynchronous(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized boolean deleteSynchronous(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized T readSynchronous(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized boolean checkAndPut(
            final InstanceIdentifier<T> identifier, final T data, final LogicalDatastoreType datastoreType,
            final boolean isUpdating); synchronized boolean checkAndMerge(
            final InstanceIdentifier<T> identifier, final T data, final LogicalDatastoreType datastoreType,
            final boolean isUpdating); synchronized boolean checkAndDelete(
            final InstanceIdentifier<T> identifier, final LogicalDatastoreType datastoreType); synchronized boolean putIfNotExists(
            final InstanceIdentifier<T> identifier, final T data, final LogicalDatastoreType datastoreType); synchronized void reinitializeChain(); @Override synchronized void close(); }
DatastoreAccess implements AutoCloseable { public synchronized <T extends DataObject> FluentFuture<java.util.Optional<T>> read( final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType) { LOG.debug("Read {}", path); if (!checkParams(path, logicalDatastoreType)) { return FluentFutures.immediateCancelledFluentFuture(); } try (ReadTransaction transaction = bindingTransactionChain.newReadOnlyTransaction()) { return transaction.read(logicalDatastoreType, path); } } private  DatastoreAccess(final DataBroker dataBroker); static DatastoreAccess getInstance(final DataBroker dataBroker); static DatastoreAccess getInstance(final DatastoreAccess datastoreAccess); synchronized FluentFuture<? extends CommitInfo> delete(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized FluentFuture<? extends CommitInfo> merge(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized FluentFuture<? extends CommitInfo> put(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized FluentFuture<java.util.Optional<T>> read(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized boolean mergeSynchronous(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized boolean putSynchronous(
            final InstanceIdentifier<T> path, final T data, final LogicalDatastoreType logicalDatastoreType); synchronized boolean deleteSynchronous(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized T readSynchronous(
            final InstanceIdentifier<T> path, final LogicalDatastoreType logicalDatastoreType); synchronized boolean checkAndPut(
            final InstanceIdentifier<T> identifier, final T data, final LogicalDatastoreType datastoreType,
            final boolean isUpdating); synchronized boolean checkAndMerge(
            final InstanceIdentifier<T> identifier, final T data, final LogicalDatastoreType datastoreType,
            final boolean isUpdating); synchronized boolean checkAndDelete(
            final InstanceIdentifier<T> identifier, final LogicalDatastoreType datastoreType); synchronized boolean putIfNotExists(
            final InstanceIdentifier<T> identifier, final T data, final LogicalDatastoreType datastoreType); synchronized void reinitializeChain(); @Override synchronized void close();  }