Package org.infinispan.counter.util
Class EncodeUtil
- java.lang.Object
-
- org.infinispan.counter.util.EncodeUtil
-
public final class EncodeUtil extends Object
Utility class to handle encoding or decoding counter's classes.- Since:
- 9.2
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
decodeStorage
public static Storage decodeStorage(byte flags)
Decodes theCounterType.- Returns:
- the decoded
CounterType. - See Also:
encodeTypeAndStorage(CounterConfiguration)
-
decodeType
public static CounterType decodeType(byte flags)
Decodes theStorage.- Returns:
- the decoded
Storage. - See Also:
encodeTypeAndStorage(CounterConfiguration)
-
encodeTypeAndStorage
public static byte encodeTypeAndStorage(CounterConfiguration configuration)
Encodes theStorageand theCounterType.See the documentation for further details about the encoding.
- Returns:
- the encoded
Storageand theCounterType. - See Also:
- Counter Configuration Encoding
-
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:
- Counter Configuration Encoding
-
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:
encodeConfiguration(CounterConfiguration, Consumer, LongConsumer, IntConsumer)
-
-