@Test public void testReadyLocalTransactionWithImmediateCommit() { final ShardTestKit testKit = new ShardTestKit(getSystem()); final TestActorRef<Shard> shard = actorFactory.createTestActor( newShardProps().withDispatcher(Dispatchers.DefaultDispatcherId()), "testReadyLocalTransactionWithImmediateCommit"); ShardTestKit.waitUntilLeader(shard); final ShardDataTree dataStore = shard.underlyingActor().getDataStore(); final DataTreeModification modification = dataStore.newModification(); final ContainerNode writeData = ImmutableNodes.containerNode(TestModel.TEST_QNAME); new WriteModification(TestModel.TEST_PATH, writeData).apply(modification); final MapNode mergeData = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME) .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42)) .build(); new MergeModification(TestModel.OUTER_LIST_PATH, mergeData).apply(modification); final TransactionIdentifier txId = nextTransactionId(); modification.ready(); final ReadyLocalTransaction readyMessage = new ReadyLocalTransaction(txId, modification, true, Optional.empty()); shard.tell(readyMessage, testKit.getRef()); testKit.expectMsgClass(CommitTransactionReply.class); final NormalizedNode<?, ?> actualNode = readStore(shard, TestModel.OUTER_LIST_PATH); assertEquals(TestModel.OUTER_LIST_QNAME.getLocalName(), mergeData, actualNode); }
@VisibleForTesting public ShardDataTree getDataStore() { return store; }
Shard extends RaftActor { @VisibleForTesting public ShardDataTree getDataStore() { return store; } }
Shard extends RaftActor { @VisibleForTesting public ShardDataTree getDataStore() { return store; } protected  Shard(final AbstractBuilder<?, ?> builder); }
Shard extends RaftActor { @VisibleForTesting public ShardDataTree getDataStore() { return store; } protected  Shard(final AbstractBuilder<?, ?> builder); @Override void postStop(); int getPendingTxCommitQueueSize(); int getCohortCacheSize(); @Override @VisibleForTesting RaftActorSnapshotCohort getRaftActorSnapshotCohort(); Collection<?> convertPendingTransactionsToMessages(); @Override String persistenceId(); DatastoreContext getDatastoreContext(); @VisibleForTesting ShardDataTree getDataStore(); static Builder builder(); }
Shard extends RaftActor { @VisibleForTesting public ShardDataTree getDataStore() { return store; } protected  Shard(final AbstractBuilder<?, ?> builder); @Override void postStop(); int getPendingTxCommitQueueSize(); int getCohortCacheSize(); @Override @VisibleForTesting RaftActorSnapshotCohort getRaftActorSnapshotCohort(); Collection<?> convertPendingTransactionsToMessages(); @Override String persistenceId(); DatastoreContext getDatastoreContext(); @VisibleForTesting ShardDataTree getDataStore(); static Builder builder(); static final String DEFAULT_NAME; }