Interface Encoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object fromStorage​(java.lang.Object content)
      Convert from storage format to the read/write format.
      MediaType getStorageFormat()
      Returns the MediaType produced by this encoder or null if the storage format is not known.
      short id()
      Each encoder is associated with an unique id in order to optimize serialization.
      boolean isStorageFormatFilterable()  
      java.lang.Object toStorage​(java.lang.Object content)
      Convert data in the read/write format to the storage format.
    • Method Detail

      • toStorage

        java.lang.Object toStorage​(java.lang.Object content)
        Convert data in the read/write format to the storage format.
        Parameters:
        content - data to be converted, never null.
        Returns:
        Object in the storage format.
      • fromStorage

        java.lang.Object fromStorage​(java.lang.Object content)
        Convert from storage format to the read/write format.
        Parameters:
        content - data as stored in the cache, never null.
        Returns:
        data in the read/write format
      • isStorageFormatFilterable

        boolean isStorageFormatFilterable()
        Returns:
        if true, will perform stream and related operation in the storage format.
      • getStorageFormat

        MediaType getStorageFormat()
        Returns the MediaType produced by this encoder or null if the storage format is not known.
      • id

        short id()
        Each encoder is associated with an unique id in order to optimize serialization. Known ids are kept in EncoderIds.
        Returns:
        unique identifier for this encoder