Package redis.clients.jedis

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


    try {
      Set<String> oldKeys = jedis.keys(oldRepository.name + ":*");
      Transaction t = jedis.multi();
      for (String oldKey : oldKeys) {
        String newKey = newRepository.name + oldKey.substring(oldKey.indexOf(':'));
        t.rename(oldKey, newKey);
      }
      t.exec();
      success = true;
    } catch (JedisException e) {
      log.error("failed to rename tickets in Redis @ " + getUrl(), e);
View Full Code Here


    try {
      Set<String> oldKeys = jedis.keys(oldRepository.name + ":*");
      Transaction t = jedis.multi();
      for (String oldKey : oldKeys) {
        String newKey = newRepository.name + oldKey.substring(oldKey.indexOf(':'));
        t.rename(oldKey, newKey);
      }
      t.exec();
      success = true;
    } catch (JedisException e) {
      log.error("failed to rename tickets in Redis @ " + getUrl(), e);
View Full Code Here

            String hourStart = ISO_FORMAT.format(new Date());
            String existing = conn.get(startKey);

            Transaction trans = conn.multi();
            if (existing != null && COLLATOR.compare(existing, hourStart) < 0){
                trans.rename(commonDest, commonDest + ":last");
                trans.rename(startKey, commonDest + ":pstart");
                trans.set(startKey, hourStart);
            }

            trans.zincrby(commonDest, 1, message);
View Full Code Here

            String existing = conn.get(startKey);

            Transaction trans = conn.multi();
            if (existing != null && COLLATOR.compare(existing, hourStart) < 0){
                trans.rename(commonDest, commonDest + ":last");
                trans.rename(startKey, commonDest + ":pstart");
                trans.set(startKey, hourStart);
            }

            trans.zincrby(commonDest, 1, message);
View Full Code Here

            String hourStart = ISO_FORMAT.format(new Date());

            String existing = conn.get(startKey);
            Transaction trans = conn.multi();
            if (existing != null && COLLATOR.compare(existing, hourStart) < 0){
                trans.rename(destination, destination + ":last");
                trans.rename(startKey, destination + ":pstart");
                trans.set(startKey, hourStart);
            }

            String tkey1 = UUID.randomUUID().toString();
View Full Code Here

            String existing = conn.get(startKey);
            Transaction trans = conn.multi();
            if (existing != null && COLLATOR.compare(existing, hourStart) < 0){
                trans.rename(destination, destination + ":last");
                trans.rename(startKey, destination + ":pstart");
                trans.set(startKey, hourStart);
            }

            String tkey1 = UUID.randomUUID().toString();
            String tkey2 = UUID.randomUUID().toString();
View Full Code Here

        Jedis jedis = pool.getResource();
        try {
            Transaction transaction = jedis.multi();

            transaction.rename(oldCreationTimeKey, newCreationTimeKey);
            transaction.rename(oldLastAccessTimeKey, newLastAccessTimeKey);
            transaction.rename(oldExpiresAtKey, newExpiresAtKey);
            transaction.rename(oldTimeoutKey, newTimeoutKey);

            if (attributeNames != null && !attributeNames.isEmpty()) {
View Full Code Here

        Jedis jedis = pool.getResource();
        try {
            Transaction transaction = jedis.multi();

            transaction.rename(oldCreationTimeKey, newCreationTimeKey);
            transaction.rename(oldLastAccessTimeKey, newLastAccessTimeKey);
            transaction.rename(oldExpiresAtKey, newExpiresAtKey);
            transaction.rename(oldTimeoutKey, newTimeoutKey);

            if (attributeNames != null && !attributeNames.isEmpty()) {
                for (String attributeName : attributeNames) {
View Full Code Here

        try {
            Transaction transaction = jedis.multi();

            transaction.rename(oldCreationTimeKey, newCreationTimeKey);
            transaction.rename(oldLastAccessTimeKey, newLastAccessTimeKey);
            transaction.rename(oldExpiresAtKey, newExpiresAtKey);
            transaction.rename(oldTimeoutKey, newTimeoutKey);

            if (attributeNames != null && !attributeNames.isEmpty()) {
                for (String attributeName : attributeNames) {
                    String oldKey = RedisSessionKeys.getAttrKey(this.id, attributeName);
View Full Code Here

            Transaction transaction = jedis.multi();

            transaction.rename(oldCreationTimeKey, newCreationTimeKey);
            transaction.rename(oldLastAccessTimeKey, newLastAccessTimeKey);
            transaction.rename(oldExpiresAtKey, newExpiresAtKey);
            transaction.rename(oldTimeoutKey, newTimeoutKey);

            if (attributeNames != null && !attributeNames.isEmpty()) {
                for (String attributeName : attributeNames) {
                    String oldKey = RedisSessionKeys.getAttrKey(this.id, attributeName);
                    String newKey = RedisSessionKeys.getAttrKey(id, attributeName);
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.