Class AbstractSerializableValueSerializer<T extends SerializableValue>

    • Field Detail

      • serializationDataFormat

        protected java.lang.String serializationDataFormat
    • Constructor Detail

      • AbstractSerializableValueSerializer

        public AbstractSerializableValueSerializer​(SerializableValueType type,
                                                   java.lang.String serializationDataFormat)
    • Method Detail

      • createDeserializedValue

        protected abstract T createDeserializedValue​(java.lang.Object deserializedObject,
                                                     java.lang.String serializedStringValue,
                                                     ValueFields valueFields,
                                                     boolean asTransientValue)
      • createSerializedValue

        protected abstract T createSerializedValue​(java.lang.String serializedStringValue,
                                                   ValueFields valueFields,
                                                   boolean asTransientValue)
      • writeToValueFields

        protected abstract void writeToValueFields​(T value,
                                                   ValueFields valueFields,
                                                   byte[] serializedValue)
      • updateTypedValue

        protected abstract void updateTypedValue​(T value,
                                                 java.lang.String serializedStringValue)
      • readSerializedValueFromFields

        protected byte[] readSerializedValueFromFields​(ValueFields valueFields)
      • getSerializedStringValue

        protected java.lang.String getSerializedStringValue​(byte[] serializedByteValue)
      • getSerializedBytesValue

        protected byte[] getSerializedBytesValue​(java.lang.String serializedStringValue)
      • canSerializeValue

        protected abstract boolean canSerializeValue​(java.lang.Object value)
        return true if this serializer is able to serialize the provided object.
        Parameters:
        value - the object to test (guaranteed to be a non-null value)
        Returns:
        true if the serializer can handle the object.
      • serializeToByteArray

        protected abstract byte[] serializeToByteArray​(java.lang.Object deserializedObject)
                                                throws java.lang.Exception
        Implementations must return a byte[] representation of the provided object. The object is guaranteed not to be null.
        Parameters:
        deserializedObject - the object to serialize
        Returns:
        the byte array value of the object
        Throws:
        exception - in case the object cannot be serialized
        java.lang.Exception
      • deserializeFromByteArray

        protected abstract java.lang.Object deserializeFromByteArray​(byte[] object,
                                                                     ValueFields valueFields)
                                                              throws java.lang.Exception
        Deserialize the object from a byte array.
        Parameters:
        object - the object to deserialize
        valueFields - the value fields
        Returns:
        the deserialized object
        Throws:
        exception - in case the object cannot be deserialized
        java.lang.Exception
      • isSerializationTextBased

        protected abstract boolean isSerializationTextBased()
        Return true if the serialization is text based. Return false otherwise