com.aliyun.tair.tairsearch.params.TFTAddDocParams 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.tairsearch.params;
import java.util.ArrayList;
import java.util.Map;
import redis.clients.jedis.util.SafeEncoder;
public class TFTAddDocParams {
public byte[][] getByteParams(String key, Map docs) {
ArrayList byteParams = new ArrayList();
byteParams .add(SafeEncoder.encode(key));
for (Map.Entry entry : docs.entrySet()) {
byteParams.add(SafeEncoder.encode(entry.getKey()));
byteParams.add(SafeEncoder.encode(entry.getValue()));
}
return byteParams.toArray(new byte[byteParams.size()][]);
}
public byte[][] getByteParams(byte[] key, Map docs) {
ArrayList byteParams = new ArrayList();
byteParams .add(key);
for (Map.Entry entry : docs.entrySet()) {
byteParams.add(entry.getKey());
byteParams.add(entry.getValue());
}
return byteParams.toArray(new byte[byteParams.size()][]);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy