Examples of multi()


Examples of redis.clients.jedis.Jedis.multi()

    protected CacheEntryDAO entryDao;

    public CacheEntry save(CacheEntry entry)
    {
        Jedis jedis = jedisPool.getResource();
        Transaction transaction = jedis.multi();
        boolean discard = true;

        try
        {
            entryDao.save(entry, transaction);
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

    }

    public void delete(CacheEntry entry)
    {
        Jedis jedis = jedisPool.getResource();
        Transaction transaction = jedis.multi();
        boolean discard = true;

        try
        {
            entryDao.delete(entry, transaction);
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

                jobsToInsert.add(job);
            }
        }

        // Save logic
        Transaction transaction = jedis.multi();
        boolean discard = true;

        try
        {
            // Persist not persisted Jobs
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

    }

    public void delete(final Task task)
    {
        Jedis jedis = jedisPool.getResource();
        Transaction transaction = jedis.multi();
        boolean discard = true;

        try
        {
            delete(task, transaction);
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

    }

    public void delete(final List<Task> tasks)
    {
        Jedis jedis = jedisPool.getResource();
        Transaction transaction = jedis.multi();
        boolean discard = true;

        try
        {
            for (Task task : tasks)
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

    }

    public Job save(final Job job)
    {
        Jedis jedis = jedisPool.getResource();
        Transaction transaction = jedis.multi();
        boolean discard = true;

        try
        {
            jobDao.save(job, transaction);
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

    public void trimOwnersTasks(final TaskOwnerType type, final long numberOfTasks)
    {
        Jedis jedis = jedisPool.getResource();
        Jedis jedisTx = jedisPool.getResource();
        Transaction transaction = jedisTx.multi();
        boolean discard = true;

        try
        {
            Set<String> owners = jedis.smembers(ownerIndexKey(type));
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

      return false;
    }

    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;
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

      String object = TicketSerializer.serialize(ticket);
      String journal = TicketSerializer.serialize(change);

      // atomically store ticket
      Transaction t = jedis.multi();
      t.set(key(repository, KeyType.ticket, ticketId), object);
      t.rpush(key(repository, KeyType.journal, ticketId), journal);
      t.exec();

      log.debug("updated ticket {} in Redis @ {}", "" + ticketId, getUrl());
View Full Code Here

Examples of redis.clients.jedis.Jedis.multi()

    boolean success = false;
    try {
      Set<String> keys = jedis.keys(repository.name + ":*");
      if (keys.size() > 0) {
        Transaction t = jedis.multi();
        t.del(keys.toArray(new String[keys.size()]));
        t.exec();
      }
      success = true;
    } catch (JedisException 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.