Package info.archinnov.achilles.persistence

Examples of info.archinnov.achilles.persistence.Batch.startBatch()


    @Test
    public void should_apply_interceptors_after_flush_for_batch() throws Exception {
        // Given
        final Batch batchingPM = pmf.createBatch();
        batchingPM.startBatch();

        CompleteBean entity = builder().randomId().name("DuyHai").label("label").buid();

        // When
        batchingPM.insert(entity);
View Full Code Here


        entity.setName("name");

        final EntityWithConsistencyLevelOnClassAndField managed = manager.insert(entity);

        Batch batch = pmf.createBatch();
        batch.startBatch(ONE);
        managed.setName("changed_name");
        logAsserter.prepareLogLevel();

        batch.update(managed);
View Full Code Here

        entity.setId(RandomUtils.nextLong(0,Long.MAX_VALUE));
        entity.setName("name");
        entity.setCount(CounterBuilder.incr());

        Batch batchEm = pmf.createBatch();
        batchEm.startBatch(THREE);
        entity = batchEm.insert(entity);

        expectedEx.expect(UnavailableException.class);
        expectedEx.expectMessage("Not enough replica available for query at consistency THREE (3 required but only 1 alive)");
View Full Code Here

        manager.insert(tweet1);

        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

        batch.startBatch(QUORUM);

        Tweet foundTweet1 = manager.find(Tweet.class, tweet1.getId());
View Full Code Here

        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

        batch.startBatch(QUORUM);

        Tweet foundTweet1 = manager.find(Tweet.class, tweet1.getId());

        assertThat(foundTweet1.getContent()).isEqualTo(tweet1.getContent());
View Full Code Here

        manager.insert(tweet1);

        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

        batch.startBatch(TWO);
        batch.insertOrUpdate(tweet2);

        try {
View Full Code Here

        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

        batch.startBatch(TWO);
        batch.insertOrUpdate(tweet2);

        try {
            batch.endBatch();
        } catch (Exception e) {
View Full Code Here

        //Given
        CompleteBean entity = CompleteBeanTestBuilder.builder().randomId().name("name").buid();
        final Batch batch = manager.createOrderedBatch();

        //When
        batch.startBatch();

        entity = batch.insert(entity);
        entity.setLabel("label");
        batch.update(entity);
View Full Code Here

        //Given
        CompleteBean entity = CompleteBeanTestBuilder.builder().randomId().name("name1000").buid();
        final Batch batch = manager.createOrderedBatch();

        //When
        batch.startBatch();

        entity = batch.insert(entity);
        entity.setName("name");
        batch.update(entity);
View Full Code Here

        manager.insert(entity2);

        final Batch batch = manager.createBatch();

        batch.startBatch();

        batch.insert(entity1);

        final Update.Where statement = update(CompleteBean.TABLE_NAME).with(set("name", bindMarker("name")))
                .where(eq("id", bindMarker("id")));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.