com.logicbus.redis.result.ScanResult Maven / Gradle / Ivy
package com.logicbus.redis.result;
import java.util.List;
import com.logicbus.redis.client.Result;
import com.logicbus.redis.util.SafeEncoder;
/**
* Key扫描结果
*
* @author duanyy
*
* @param
*/
public class ScanResult extends Result {
private byte[] cursor;
private List results;
public ScanResult(String cursor, List results) {
this(SafeEncoder.encode(cursor), results);
}
public ScanResult(byte[] cursor, List results) {
this.cursor = cursor;
this.results = results;
}
public String getCursor() {
return SafeEncoder.encode(cursor);
}
public byte[] getCursorAsBytes() {
return cursor;
}
public List getResult() {
return results;
}
}