Package com.cxy.redisclient.integration.key

Examples of com.cxy.redisclient.integration.key.Expire


   
  }

  @Override
  protected void afterAdd() {
    Expire command2 = new Expire(id, db, key, ttl);
    command2.execute(jedis);
  }
View Full Code Here


    int ttl = (int) command1.getSecond();
   
    jedis.select(db);
    jedis.set(key, value);
   
    Expire command2 = new Expire(id, db, key, ttl);
    command2.execute(jedis);
  }
View Full Code Here

  public void add(int id, int db, String key, List<String> values, boolean headTail, boolean exist, int ttl) {
    AddList command = new AddList(id, db, key, values, headTail, exist);
    command.execute();
   
    if(ttl != -1){
      Expire command1 = new Expire(id, db, key, ttl);
      command1.execute();
    }

  }
View Full Code Here

  public void add(int id, int db, String key, Map<String, Double> values, int ttl) {
    AddZSet command = (AddZSet) new AddZSetFactory(id, db, key, values).getCommand();
    command.execute();
   
    if(ttl != -1){
      Expire command1 = new Expire(id, db, key, ttl);
      command1.execute();
    }
  }
View Full Code Here

  public void add(int id, int db, String key, Map<String, String> values, int ttl) {
    AddHash command = new AddHash(id, db, key, values);
    command.execute();
   
    if(ttl != -1){
      Expire command1 = new Expire(id, db, key, ttl);
      command1.execute();
    }
  }
View Full Code Here

  public long add(int id, int db, String key, Set<String> values, int ttl) {
    AddSet command = (AddSet) new AddSetFactory(id, db, key, values).getCommand();
    command.execute();
   
    if(ttl != -1){
      Expire command1 = new Expire(id, db, key, ttl);
      command1.execute();
    }
    return command.getSize();

  }
View Full Code Here

  }
  public void expire(int id, int db, String key, int ttl){
    if(!isKeyExist(id, db, key))
      throw new KeyNotExistException(id, db, key);
   
    Expire command1 = new Expire(id, db, key, ttl);
    command1.execute();

  }
View Full Code Here

TOP

Related Classes of com.cxy.redisclient.integration.key.Expire

Copyright © 2018 www.massapicom. 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.