Interface AttributeCompressionStrategy

  • All Superinterfaces:
    BlobStrategy

    public interface AttributeCompressionStrategy
    extends BlobStrategy
    Responsible for performing a specialised JSON compression based on the attribute name being stored in the JSON. The compression is a somewhat simple reduction of each Attribute Name to its initials. This works because we know the fields within the InternalSession. This approach is however brittle and only recommended if it will make the required difference in performance.
    • Method Detail

      • getInitials

        static String getInitials​(String name)
        Generate the initials from the given name. Note: This function is intended to operate against Java field name syntax. As such it simply picks out the first character and all subsequent upper case characters from the String.
        Parameters:
        name - Non null string that follows Java field name syntax.
        Returns:
        The initials of the field.
      • getAllValidFields

        static Collection<Field> getAllValidFields​(Class c)
        Examines the class using reflection for all declared fields which are suitable for serialisation.
        Parameters:
        c - Non null class to examine.
        Returns:
        A non null but possibly empty collection of Fields.