Package io.temporal.payload.codec
Class ZlibPayloadCodec
- java.lang.Object
-
- io.temporal.payload.codec.ZlibPayloadCodec
-
- All Implemented Interfaces:
PayloadCodec
public class ZlibPayloadCodec extends java.lang.Object implements PayloadCodec
PayloadCodec that provides a basic compression using Zlib.Please note that this is by no means the best solution for lots of small payloads which is typical for a lot of applications. You can use this implementation as an example and base for your own implementation using the compressor of your choice, for example Google Snappy
-
-
Constructor Summary
Constructors Constructor Description ZlibPayloadCodec()
ZlibPayloadCodec(int level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<io.temporal.api.common.v1.Payload>
decode(java.util.List<io.temporal.api.common.v1.Payload> payloads)
java.util.List<io.temporal.api.common.v1.Payload>
encode(java.util.List<io.temporal.api.common.v1.Payload> payloads)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.temporal.payload.codec.PayloadCodec
withContext
-
-
-
-
Method Detail
-
encode
@Nonnull public java.util.List<io.temporal.api.common.v1.Payload> encode(@Nonnull java.util.List<io.temporal.api.common.v1.Payload> payloads)
- Specified by:
encode
in interfacePayloadCodec
-
decode
@Nonnull public java.util.List<io.temporal.api.common.v1.Payload> decode(@Nonnull java.util.List<io.temporal.api.common.v1.Payload> payloads)
- Specified by:
decode
in interfacePayloadCodec
-
-