@Override
	public Long insert(User user) {
		ShardedJedis jedis =  getConnection(); 
		// 获取一个id
		Long id = jedis.incr(prefix + "maxid");
		// 插入用户的信息，id，username，password，email
		if (id < 0L) {
			returnConnection(jedis);
			return id;
		}
		// 添加用户各个字段的信息
		String keyPrefix = prefix + id.toString() + ":";
		jedis.set(keyPrefix + "username", user.getUserName());
		jedis.set(keyPrefix + "password", user.getPassword());
		jedis.set(keyPrefix + "email", user.getEmail());
		keyPrefix = prefix + user.getUserName() + ":";
		jedis.set(keyPrefix + "userid", id.toString());
		
		// 添加用户id和用户名称到user:ids和user:usernames
		jedis.sadd(prefix + "userids", id.toString());
		jedis.sadd(prefix + "usernames", user.getUserName());
		
		returnConnection(jedis);
		return id;
	}