org.redkalex.cache.redis.RedisCacheReqPing Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redkale-plugins Show documentation
Show all versions of redkale-plugins Show documentation
Redkale-Plugins -- java framework
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.redkalex.cache.redis;
import java.nio.charset.StandardCharsets;
import org.redkale.net.client.ClientConnection;
import org.redkale.util.ByteArray;
/** @author zhangjx */
public class RedisCacheReqPing extends RedisCacheRequest {
private static final byte[] BYTES = new ByteArray()
.put((byte) '*')
.put((byte) '1')
.put((byte) '\r', (byte) '\n')
.put((byte) '$')
.put((byte) '4')
.put((byte) '\r', (byte) '\n')
.put("PING".getBytes(StandardCharsets.UTF_8))
.put((byte) '\r', (byte) '\n')
.getBytes();
@Override
public void writeTo(ClientConnection conn, ByteArray writer) {
writer.put(BYTES);
}
@Override
public String toString() {
return getClass().getSimpleName() + "{PING}";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy