#
vincentlu
2026-03-25 c2ee312636815ef842e8ec6e173ef1fc28d0cb96
zy-acs-common/src/main/java/com/zy/acs/common/utils/RedisSupport.java
@@ -263,6 +263,54 @@
      }
      return value;
   }
   public Object pushStrict(String name, Object value) {
      if(!this.initialize){
         throw new IllegalStateException("redis is not initialized");
      }
      console("push list value",name,value);
      if(value==null){
         throw new IllegalArgumentException("push value can not be null");
      }
      byte[] payload = Serialize.serialize(value);
      if(payload == null){
         throw new IllegalStateException("serialize redis list value failed");
      }
      Jedis jedis = this.getJedis();
      try{
         jedis.rpush(("LIST."+name).getBytes(), payload);
      }catch(Exception ex){
         throw new IllegalStateException("push redis list value failed: " + name, ex);
      }finally{
         if(jedis!=null)
            this.pool.returnResource(jedis);
      }
      return value;
   }
   public Object pushHeadStrict(String name, Object value) {
      if(!this.initialize){
         throw new IllegalStateException("redis is not initialized");
      }
      console("push list head value",name,value);
      if(value==null){
         throw new IllegalArgumentException("push value can not be null");
      }
      byte[] payload = Serialize.serialize(value);
      if(payload == null){
         throw new IllegalStateException("serialize redis list value failed");
      }
      Jedis jedis = this.getJedis();
      try{
         jedis.lpush(("LIST."+name).getBytes(), payload);
      }catch(Exception ex){
         throw new IllegalStateException("push redis list head value failed: " + name, ex);
      }finally{
         if(jedis!=null)
            this.pool.returnResource(jedis);
      }
      return value;
   }
   /**
    * 获取列表头部元素
    * @param <T>