Interface ElsaClassInfoResolver

  • All Known Implementing Classes:
    ElsaClassInfoResolver.ArrayBased

    public interface ElsaClassInfoResolver

    In binary data Class Names are replaced by `Integer` IDs. This resolver maps Class Name to its ID and back.

    This way you can implement your own way to store class information. For example MapDB has custom Class Info resolver to store Class Infos in Class Catalog.

    • Method Detail

      • getClassInfo

        ElsaSerializerPojo.ClassInfo getClassInfo​(int classId)
        Resolves Integer Class ID (used in binary data) into Class Info which contains class name, fields name, fields order...
        Parameters:
        classId - binary ID which represends class in serialized data
        Returns:
        Class structure information for given class
      • classToId

        int classToId​(java.lang.String className)
        Resolves Class Name to its Class ID (used in binary data)/
        Parameters:
        className - class name as returned by Class.getName()
        Returns:
        Class ID, it is used in serialized binary data to identify class