com.aliyun.tair.taircpc.params.CpcMultiUpdateParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alibabacloud-tairjedis-sdk Show documentation
Show all versions of alibabacloud-tairjedis-sdk Show documentation
Aliyun Tair Redis client for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
package com.aliyun.tair.taircpc.params;
import redis.clients.jedis.params.Params;
import redis.clients.jedis.util.SafeEncoder;
import java.util.ArrayList;
import static redis.clients.jedis.Protocol.toByteArray;
public class CpcMultiUpdateParams extends Params {
public CpcMultiUpdateParams() {}
public static CpcMultiUpdateParams cpcMutiUpdateParams() {
return new CpcMultiUpdateParams();
}
public byte[][] getByteParams(ArrayList keys) {
ArrayList byteParams = new ArrayList();
for (CpcData key:keys) {
byteParams.add(SafeEncoder.encode(key.getKey()));
byteParams.add(SafeEncoder.encode(key.getItem()));
byteParams.add(SafeEncoder.encode(key.getExpStr()));
byteParams.add(toByteArray(key.getExp()));
}
return byteParams.toArray(new byte[byteParams.size()][]);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy