Examples of startBatch()


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

    @Test
    public void should_batch_counters() throws Exception {
        // Start batch
        Batch batch = manager.createBatch();
        batch.startBatch();

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

        entity = batch.insert(entity);
View Full Code Here

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

        Tweet tweet1 = TweetTestBuilder.tweet().randomId().content("tweet1").buid();
        Tweet tweet2 = TweetTestBuilder.tweet().randomId().content("tweet2").buid();

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

        batch.insert(bean);
        batch.insert(tweet1);
        batch.insert(tweet2);
        batch.insert(user);
View Full Code Here

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

        user = manager.insert(user);

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

        boolean exceptionCaught = false;

        try {
            batch.insert(tweet, OptionsBuilder.withConsistency(ConsistencyLevel.EACH_QUORUM));
View Full Code Here

Examples of org.caffinitas.mapper.core.PersistenceSession.startBatch()

    @Test(dependsOnMethods = "createSchema")
    public void batch_simple() throws Exception {
        PersistenceSession session = persistenceManager.createSession();
        try {
            Batch batch = session.startBatch();
            try {

                BatchEntity inst = new BatchEntity();
                inst.setId(1);
                inst.setVal("1");
View Full Code Here

Examples of org.caffinitas.mapper.core.PersistenceSession.startBatch()

    @Test(dependsOnMethods = "createSchema")
    public void batch_cas() throws Exception {

        PersistenceSession session = persistenceManager.createSession();
        try {
            Batch batch = session.startBatch();
            try {

                BatchCKEntity inst = new BatchCKEntity();
                inst.setPk(1);
                inst.setCk(1);
View Full Code Here

Examples of org.caffinitas.mapper.core.PersistenceSession.startBatch()

            inst.setPk(11);
            inst.setCk(2);
            inst.setVal("2");
            session.insert(inst, PersistOption.ifNotExists());

            Batch batch = session.startBatch();
            try {

                inst = new BatchCKEntity();
                inst.setPk(11);
                inst.setCk(2); // DUPLICATE !!
View Full Code Here

Examples of org.caffinitas.mapper.core.PersistenceSession.startBatch()

    @Test(dependsOnMethods = "createSchema", expectedExceptions = InvalidQueryException.class)
    public void batch_cas_fail_pkMix() throws Exception {
        PersistenceSession session = persistenceManager.createSession();
        try {
            Batch batch = session.startBatch();
            try {

                BatchCKEntity inst = new BatchCKEntity();
                inst.setPk(21);
                inst.setCk(1);
View Full Code Here

Examples of org.cometd.server.ServerSessionImpl.startBatch()

                    if (session == null || client_id != null && !client_id.equals(session.getId())) {
                        session = (ServerSessionImpl) getBayeux().getSession(client_id);
                        if (_autoBatch && !batch && session != null && !connect && !message.isMeta()) {
                            // start a batch to group all resulting messages into a single response.
                            batch = true;
                            session.startBatch();
                        }
                    } else if (!session.isHandshook()) {
                        batch = false;
                        session = null;
                    }
View Full Code Here

Examples of org.cometd.server.ServerSessionImpl.startBatch()

                    else
                    {
                        if (autoBatch && !batch)
                        {
                            batch = true;
                            session.startBatch();
                        }
                    }
                }

                switch (message.getChannel())
View Full Code Here

Examples of org.infinispan.Cache.startBatch()

   public void testBatchWithoutOngoingTMSuspension() throws Exception {
      Cache cache = createCache("testBatchWithoutOngoingTMSuspension");
      TransactionManager tm = TestingUtil.getTransactionManager(cache);
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.startBatch();
      cache.put("k", "v");
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.put("k2", "v2");

      assert getOnDifferentThread(cache, "k") == null;
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.