File tree Expand file tree Collapse file tree
src/main/kotlin/dev/slne/surf/redis/codec Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11kotlin.code.style =official
22kotlin.stdlib.default.dependency =false
33org.gradle.parallel =true
4- version =1.7.1
4+ version =1.8.0
Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ public final class dev/slne/surf/redis/cache/SimpleSetRedisCache$DefaultImpls {
126126
127127public abstract class dev/slne/surf/redis/codec/AbstractCodec : org/redisson/client/codec/BaseCodec {
128128 public fun <init> ()V
129+ public final fun decode (Lio/netty/buffer/ByteBuf;)Ljava/lang/Object;
130+ public final fun encode (Lio/netty/buffer/ByteBuf;Ljava/lang/Object;)V
129131 public fun getValueDecoder ()Lorg/redisson/client/protocol/Decoder;
130132 public fun getValueEncoder ()Lorg/redisson/client/protocol/Encoder;
131133 protected abstract fun read (Lio/netty/buffer/ByteBuf;)Ljava/lang/Object;
Original file line number Diff line number Diff line change @@ -28,14 +28,22 @@ abstract class AbstractCodec<T : Any> : BaseCodec() {
2828 }
2929 }
3030
31- override fun getValueEncoder (): Encoder ? {
31+ override fun getValueEncoder (): Encoder {
3232 return encoder
3333 }
3434
35- override fun getValueDecoder (): Decoder <in Any >? {
35+ override fun getValueDecoder (): Decoder <in Any > {
3636 return decoder
3737 }
3838
3939 protected abstract fun write (buf : ByteBuf , value : T )
4040 protected abstract fun read (buf : ByteBuf ): T
41+
42+ fun encode (buf : ByteBuf , value : T ) {
43+ write(buf, value)
44+ }
45+
46+ fun decode (buf : ByteBuf ): T {
47+ return read(buf)
48+ }
4149}
You can’t perform that action at this time.
0 commit comments