Package redis.clients.jedis

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


      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());
      return true;
    } catch (JedisException e) {
View Full Code Here


      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());
      return true;
    } catch (JedisException e) {
View Full Code Here

//                @Override
//                public void execute() {
            Transaction multi = jedis.multi();
            while (events.hasNext()) {
                DomainEventMessage domainEvent = events.next();
                multi.rpush(new String(key, IOUtils.UTF8), new String(eventSerializer.serialize(domainEvent, byte[].class)
                                                                             .getData(), IOUtils.UTF8));
            }
            multi.exec();
//                }
//            });
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.