![JAR search and dependency download from the Maven repository](/logo.png)
org.infinispan.server.resp.commands.generic.SCAN Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-server-resp Show documentation
Show all versions of infinispan-server-resp Show documentation
Infinispan Resp Protocol Server
package org.infinispan.server.resp.commands.generic;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import org.infinispan.container.entries.CacheEntry;
import org.infinispan.server.iteration.IterationManager;
import org.infinispan.server.resp.Resp3Handler;
import org.infinispan.server.resp.commands.iteration.BaseIterationCommand;
/**
* SCAN
*
* @since 15.0
*/
public class SCAN extends BaseIterationCommand {
public SCAN() {
super(-2, 0, 0, 0);
}
@Override
protected IterationManager retrieveIterationManager(Resp3Handler handler) {
return handler.respServer().getIterationManager();
}
@Override
protected String cursor(List raw) {
return new String(raw.get(0), StandardCharsets.US_ASCII);
}
@Override
protected List writeResponse(List response) {
List output = new ArrayList<>(response.size());
for (CacheEntry, ?> entry : response) {
output.add((byte[]) entry.getKey());
}
return output;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy