Interface SnapshotSerializer<AID extends AggregateId,A extends Aggregate<A,AID>>
-
- Type Parameters:
AID- Aggregate ID type / 集約IDの型A- Aggregate type / 集約の型
- All Known Implementing Classes:
DefaultSnapshotSerializer
public interface SnapshotSerializer<AID extends AggregateId,A extends Aggregate<A,AID>>This is an interface for serializing and deserializing snapshots. / スナップショットのシリアライズとデシリアライズを行うためのインターフェース。
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Adeserialize(byte[] bytes, java.lang.Class<A> clazz)Deserializes the snapshot.byte[]serialize(A snapshot)Serializes the snapshot.
-
-
-
Method Detail
-
serialize
@Nonnull byte[] serialize(@Nonnull A snapshot) throws SerializationExceptionSerializes the snapshot. / スナップショットをシリアライズします。- Parameters:
snapshot- snapshot / スナップショット- Returns:
- serialized snapshot / シリアライズされたスナップショット
- Throws:
SerializationException- if an error occurred during serialization / シリアライズ中にエラーが発生した場合
-
deserialize
@Nonnull A deserialize(@Nonnull byte[] bytes, @Nonnull java.lang.Class<A> clazz) throws DeserializationException
Deserializes the snapshot. / スナップショットをデシリアライズします。- Parameters:
bytes- bytes / バイト列clazz- class ofAggregateA to be deserialized / デシリアライズ対象の集約Aのクラス- Returns:
- deserialized snapshot / デシリアライズされたスナップショット
- Throws:
DeserializationException- if an error occurred during deserialization / デシリアライズ中にエラーが発生した場合
-
-