code: public Boolean persist(final String id, final Map<String, Object> snapshot, final int maxInactiveInterval) {
          final String sid = sessionPrefix + ":" + id;
          try {
              this.executor.execute(new RedisCallback<Void>() {
                  public Void execute(Jedis jedis) {
                      if (snapshot.isEmpty()) {
                          // delete session
                          jedis.del(sid);
                      } else {
                          // set session
                          jedis.setex(sid, maxInactiveInterval, serializer.serialize(snapshot));
                      }
                      return null;
                  }
              });
              return Boolean.TRUE;
          } catch (Exception e) {
              log.error("failed to persist session(id={}, snapshot={}), cause:{}",
                      sid, snapshot, Throwables.getStackTraceAsString(e));
              return Boolean.FALSE;
          }
      }
docs: persist session to session store
  @param id session id
  @param snapshot session attributes' snapshot
  @param maxInactiveInterval session max life(seconds)
  @return true if save successfully, or false