@Test public void testReadThrottlingWhenShardFound() { throttleOperation(transactionProxy -> { doReturn(incompleteFuture()).when(mockActorContext).executeOperationAsync( any(ActorSelection.class), eqReadData()); transactionProxy.read(TestModel.TEST_PATH); transactionProxy.read(TestModel.TEST_PATH); }); }
@Override public FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path) { checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed"); requireNonNull(path, "path should not be null"); LOG.trace("Tx {} read {}", getIdentifier(), path); return path.isEmpty() ? readAllData() : singleShardRead(shardNameFromIdentifier(path), path); }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path) { checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed"); requireNonNull(path, "path should not be null"); LOG.trace("Tx {} read {}", getIdentifier(), path); return path.isEmpty() ? readAllData() : singleShardRead(shardNameFromIdentifier(path), path); } }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path) { checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed"); requireNonNull(path, "path should not be null"); LOG.trace("Tx {} read {}", getIdentifier(), path); return path.isEmpty() ? readAllData() : singleShardRead(shardNameFromIdentifier(path), path); } @VisibleForTesting  TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type); }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path) { checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed"); requireNonNull(path, "path should not be null"); LOG.trace("Tx {} read {}", getIdentifier(), path); return path.isEmpty() ? readAllData() : singleShardRead(shardNameFromIdentifier(path), path); } @VisibleForTesting  TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type); @Override FluentFuture<Boolean> exists(final YangInstanceIdentifier path); @Override FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path); @Override void delete(final YangInstanceIdentifier path); @Override void merge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override void write(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override final void close(); @Override final AbstractThreePhaseCommitCohort<?> ready(); }
TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction { @Override public FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path) { checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed"); requireNonNull(path, "path should not be null"); LOG.trace("Tx {} read {}", getIdentifier(), path); return path.isEmpty() ? readAllData() : singleShardRead(shardNameFromIdentifier(path), path); } @VisibleForTesting  TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type); @Override FluentFuture<Boolean> exists(final YangInstanceIdentifier path); @Override FluentFuture<Optional<NormalizedNode<?, ?>>> read(final YangInstanceIdentifier path); @Override void delete(final YangInstanceIdentifier path); @Override void merge(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override void write(final YangInstanceIdentifier path, final NormalizedNode<?, ?> data); @Override final void close(); @Override final AbstractThreePhaseCommitCohort<?> ready();  }