Package redis.clients.jedis

Examples of redis.clients.jedis.Transaction.exec()


  Jedis jedis2 = createJedis();
  jedis2.select(1);
  jedis2.set("foo", "bar2");

  List<Object> results = t.exec();

  assertNull(results);
    }

    @Test
View Full Code Here


  nj.auth("foobared");
  nj.set("mykey", "bar");
  nj.disconnect();

  t.set("mykey", "foo");
  List<Object> resp = t.exec();
  assertNotNull(resp);
  assertEquals(1, resp.size());
  assertEquals("foo", jedis.get("mykey"));
    }
}
View Full Code Here

        boolean discard = true;

        try
        {
            entryDao.save(entry, transaction);
            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

        boolean discard = true;

        try
        {
            entryDao.delete(entry, transaction);
            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

            // Index task and owner
            deindexTaskByOwner(task, transaction);
            indexTaskByOwner(task, transaction);
            indexTaskOwner(task, transaction);

            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

        boolean discard = true;

        try
        {
            delete(task, transaction);
            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

            for (Task task : tasks)
            {
                delete(task, transaction);
            }

            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

        boolean discard = true;

        try
        {
            jobDao.save(job, transaction);
            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

                    Task task = taskDao.find(taskKey, jedis);
                    delete(task, transaction);
                }
            }

            transaction.exec();
            discard = false;
        }
        finally
        {
            if (discard)
View Full Code Here

    try {
      // atomically remove ticket
      Transaction t = jedis.multi();
      t.del(key(repository, KeyType.ticket, ticket.number));
      t.del(key(repository, KeyType.journal, ticket.number));
      t.exec();

      success = true;
      log.debug("deleted ticket {} from Redis @ {}", "" + ticket.number, getUrl());
    } catch (JedisException e) {
      log.error("failed to delete ticket from Redis @ " + getUrl(), e);
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.