com.lambdaworks.redis.output.StatusOutput Maven / Gradle / Ivy
// Copyright (C) 2011 - Will Glozer. All rights reserved.
package com.lambdaworks.redis.output;
import com.lambdaworks.redis.codec.RedisCodec;
import com.lambdaworks.redis.protocol.CommandOutput;
import java.nio.ByteBuffer;
import static com.lambdaworks.redis.protocol.Charsets.buffer;
/**
* Status message output.
*
* @author Will Glozer
*/
public class StatusOutput extends CommandOutput {
private static final ByteBuffer OK = buffer("OK");
public StatusOutput(RedisCodec codec) {
super(codec, null);
}
@Override
public void set(ByteBuffer bytes) {
output = OK.equals(bytes) ? "OK" : decodeAscii(bytes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy