Class DefaultSnapshotSerializer<AID extends AggregateId,​A extends Aggregate<A,​AID>>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      A deserialize​(byte[] bytes, java.lang.Class<A> clazz)
      Deserializes the snapshot.
      byte[] serialize​(A snapshot)
      Serializes the snapshot.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultSnapshotSerializer

        public DefaultSnapshotSerializer()
    • Method Detail

      • serialize

        @Nonnull
        public byte[] serialize​(@Nonnull
                                A snapshot)
                         throws SerializationException
        Description copied from interface: SnapshotSerializer
        Serializes the snapshot. / スナップショットをシリアライズします。
        Specified by:
        serialize in interface SnapshotSerializer<AID extends AggregateId,​A extends Aggregate<A,​AID>>
        Parameters:
        snapshot - snapshot / スナップショット
        Returns:
        serialized snapshot / シリアライズされたスナップショット
        Throws:
        SerializationException - if an error occurred during serialization / シリアライズ中にエラーが発生した場合
      • deserialize

        @Nonnull
        public A deserialize​(@Nonnull
                             byte[] bytes,
                             @Nonnull
                             java.lang.Class<A> clazz)
                      throws DeserializationException
        Description copied from interface: SnapshotSerializer
        Deserializes the snapshot. / スナップショットをデシリアライズします。
        Specified by:
        deserialize in interface SnapshotSerializer<AID extends AggregateId,​A extends Aggregate<A,​AID>>
        Parameters:
        bytes - bytes / バイト列
        clazz - class of Aggregate A to be deserialized / デシリアライズ対象の集約Aのクラス
        Returns:
        deserialized snapshot / デシリアライズされたスナップショット
        Throws:
        DeserializationException - if an error occurred during deserialization / デシリアライズ中にエラーが発生した場合