Package org.infinispan.counter.util
Class EncodeUtil
java.lang.Object
org.infinispan.counter.util.EncodeUtil
Utility class to handle encoding or decoding counter's classes.
- Since:
- 9.2
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionstatic CounterConfigurationdecodeConfiguration(Supplier<Byte> byteSupplier, LongSupplier longSupplier, IntSupplier intSupplier) static StoragedecodeStorage(byte flags) Decodes theCounterType.static CounterTypedecodeType(byte flags) Decodes theStorage.static voidencodeConfiguration(CounterConfiguration configuration, Consumer<Byte> byteConsumer, LongConsumer longConsumer, IntConsumer intConsumer) Encodes the configuration.static byteencodeTypeAndStorage(CounterConfiguration configuration) Encodes theStorageand theCounterType.
-
Method Details
-
decodeStorage
Decodes theCounterType.- Returns:
- the decoded
CounterType. - See Also:
-
decodeType
Decodes theStorage.- Returns:
- the decoded
Storage. - See Also:
-
encodeTypeAndStorage
Encodes theStorageand theCounterType.See the documentation for further details about the encoding.
- Returns:
- the encoded
Storageand theCounterType. - See Also:
-
encodeConfiguration
public static void encodeConfiguration(CounterConfiguration configuration, Consumer<Byte> byteConsumer, LongConsumer longConsumer, IntConsumer intConsumer) Encodes the configuration.See the documentation for further details about the encoding.
- See Also:
-
decodeConfiguration
public static CounterConfiguration decodeConfiguration(Supplier<Byte> byteSupplier, LongSupplier longSupplier, IntSupplier intSupplier) Decodes aCounterConfigurationencoded byencodeConfiguration(CounterConfiguration, Consumer, LongConsumer, IntConsumer).- Returns:
- the decoded
CounterConfiguration. - See Also:
-