Module io.github.bucket4j.core
Interface SerializationHandle<T>
public interface SerializationHandle<T>
-
Method Summary
Modifier and TypeMethodDescription<I> Tdeserialize(DeserializationAdapter<I> adapter, I input) fromJsonCompatibleSnapshot(Map<String, Object> snapshot) intdefault double[]readDoubleArray(Map<String, Object> snapshot, String fieldName) default intreadIntValue(Map<String, Object> snapshot, String fieldName) default long[]readLongArray(Map<String, Object> snapshot, String fieldName) default LongreadLongValue(Map<String, Object> snapshot, String fieldName) default IntegerreadOptionalIntValue(Map<String, Object> snapshot, String fieldName) default LongreadOptionalLongValue(Map<String, Object> snapshot, String fieldName) <O> voidserialize(SerializationAdapter<O> adapter, O output, T serializableObject, Version backwardCompatibilityVersion, Scope scope) toJsonCompatibleSnapshot(T serializableObject, Version backwardCompatibilityVersion, Scope scope)
-
Method Details
-
deserialize
- Throws:
IOException
-
serialize
<O> void serialize(SerializationAdapter<O> adapter, O output, T serializableObject, Version backwardCompatibilityVersion, Scope scope) throws IOException - Throws:
IOException
-
getTypeId
int getTypeId()- Returns:
- the type identifier that is unique across all Bucket4j classes
-
getSerializedType
-
fromJsonCompatibleSnapshot
- Throws:
IOException
-
toJsonCompatibleSnapshot
Map<String,Object> toJsonCompatibleSnapshot(T serializableObject, Version backwardCompatibilityVersion, Scope scope) throws IOException - Throws:
IOException
-
getTypeName
String getTypeName()- Returns:
- the type identifier that is unique across all Bucket4j classes
-
readDoubleArray
-
readLongArray
-
readLongValue
-
readOptionalLongValue
-
readOptionalIntValue
-
readIntValue
-