Search in sources :

Example 31 with BatchedModifications

use of org.opendaylight.controller.cluster.datastore.messages.BatchedModifications in project controller by opendaylight.

the class AbstractShardTest method prepareBatchedModifications.

protected static BatchedModifications prepareBatchedModifications(final TransactionIdentifier transactionID, final MutableCompositeModification modification, final boolean doCommitOnReady) {
    final BatchedModifications batchedModifications = new BatchedModifications(transactionID, CURRENT_VERSION);
    batchedModifications.addModification(modification);
    batchedModifications.setReady(true);
    batchedModifications.setDoCommitOnReady(doCommitOnReady);
    batchedModifications.setTotalMessagesSent(1);
    return batchedModifications;
}
Also used : BatchedModifications(org.opendaylight.controller.cluster.datastore.messages.BatchedModifications)

Aggregations

BatchedModifications (org.opendaylight.controller.cluster.datastore.messages.BatchedModifications)31 Test (org.junit.Test)17 WriteModification (org.opendaylight.controller.cluster.datastore.modification.WriteModification)13 ActorRef (akka.actor.ActorRef)12 Failure (akka.actor.Status.Failure)7 TransactionIdentifier (org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier)7 YangInstanceIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)7 NormalizedNodeAggregatorTest (org.opendaylight.controller.cluster.datastore.utils.NormalizedNodeAggregatorTest)6 TestActorRef (akka.testkit.TestActorRef)5 TestKit (akka.testkit.javadsl.TestKit)5 MergeModification (org.opendaylight.controller.cluster.datastore.modification.MergeModification)5 Timeout (akka.util.Timeout)4 CommitTransactionReply (org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply)4 DOMStoreThreePhaseCommitCohort (org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort)4 DataTreeModification (org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification)4 DeleteModification (org.opendaylight.controller.cluster.datastore.modification.DeleteModification)3 FollowerInitialSyncUpStatus (org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus)3 InOrder (org.mockito.InOrder)2 BatchedModificationsReply (org.opendaylight.controller.cluster.datastore.messages.BatchedModificationsReply)2 ReadyLocalTransaction (org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction)2