Class RedisMessage
- java.lang.Object
-
- cc.carm.plugin.mineredis.api.message.RedisMessage
-
public class RedisMessage extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull java.lang.String
channel
protected @Nullable com.google.common.io.ByteArrayDataInput
data
protected byte[]
rawData
protected @NotNull java.lang.String
sourceServerID
protected long
timestamp
-
Constructor Summary
Constructors Constructor Description RedisMessage(@NotNull java.lang.String channel, @NotNull java.lang.String sourceServerID, long timestamp, byte[] raw)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
apply(@NotNull java.util.function.Function<com.google.common.io.ByteArrayDataInput,T> handler)
@NotNull java.lang.String
channel()
com.google.common.io.ByteArrayDataInput
data()
com.google.common.io.ByteArrayDataInput
dataCopy()
@NotNull java.lang.String
getChannel()
com.google.common.io.ByteArrayDataInput
getData()
@NotNull java.lang.String
getSourceServerID()
long
getTimestamp()
boolean
isLocalMessage()
判断当前消息是否为本地(当前服务器)发出的。byte[]
raw()
void
reset()
@NotNull java.lang.String
sourceID()
long
timestamp()
-
-
-
Field Detail
-
channel
@NotNull protected final @NotNull java.lang.String channel
-
sourceServerID
@NotNull protected final @NotNull java.lang.String sourceServerID
-
timestamp
protected final long timestamp
-
rawData
protected final byte[] rawData
-
data
@Nullable protected @Nullable com.google.common.io.ByteArrayDataInput data
-
-
Method Detail
-
isLocalMessage
public boolean isLocalMessage()
判断当前消息是否为本地(当前服务器)发出的。- Returns:
- 是否为本地发出的消息
-
getSourceServerID
@NotNull public @NotNull java.lang.String getSourceServerID()
-
sourceID
@NotNull public @NotNull java.lang.String sourceID()
-
getChannel
@NotNull public @NotNull java.lang.String getChannel()
-
channel
@NotNull public @NotNull java.lang.String channel()
-
getTimestamp
public long getTimestamp()
-
timestamp
public long timestamp()
-
raw
public byte[] raw()
-
data
public com.google.common.io.ByteArrayDataInput data()
-
getData
public com.google.common.io.ByteArrayDataInput getData()
-
reset
public void reset()
-
dataCopy
public com.google.common.io.ByteArrayDataInput dataCopy()
-
apply
public <T> T apply(@NotNull @NotNull java.util.function.Function<com.google.common.io.ByteArrayDataInput,T> handler)
-
-