Module io.github.bucket4j.core
Interface SerializationHandle<T>
-
public interface SerializationHandle<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <I> Tdeserialize(DeserializationAdapter<I> adapter, I input, Version backwardCompatibilityVersion)TfromJsonCompatibleSnapshot(Map<String,Object> snapshot, Version backwardCompatibilityVersion)Class<T>getSerializedType()intgetTypeId()StringgetTypeName()default double[]readDoubleArray(Map<String,Object> snapshot, String fieldName)default IntegerreadIntegerValue(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)<O> voidserialize(SerializationAdapter<O> adapter, O output, T serializableObject, Version backwardCompatibilityVersion)Map<String,Object>toJsonCompatibleSnapshot(T serializableObject, Version backwardCompatibilityVersion)
-
-
-
Method Detail
-
deserialize
<I> T deserialize(DeserializationAdapter<I> adapter, I input, Version backwardCompatibilityVersion) throws IOException
- Throws:
IOException
-
serialize
<O> void serialize(SerializationAdapter<O> adapter, O output, T serializableObject, Version backwardCompatibilityVersion) throws IOException
- Throws:
IOException
-
getTypeId
int getTypeId()
- Returns:
- the type identifier that is unique across all Bucket4j classes
-
fromJsonCompatibleSnapshot
T fromJsonCompatibleSnapshot(Map<String,Object> snapshot, Version backwardCompatibilityVersion) throws IOException
- Throws:
IOException
-
toJsonCompatibleSnapshot
Map<String,Object> toJsonCompatibleSnapshot(T serializableObject, Version backwardCompatibilityVersion) throws IOException
- Throws:
IOException
-
getTypeName
String getTypeName()
- Returns:
- the type identifier that is unique across all Bucket4j classes
-
-