Class StructuredCacheEntry

  • All Implemented Interfaces:
    CacheEntryStructure

    public class StructuredCacheEntry
    extends java.lang.Object
    implements CacheEntryStructure
    Structured CacheEntry format for entities. Used to store the entry into the second-level cache as a Map so that users can more easily see the cached state.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SUBCLASS_KEY  
      static java.lang.String VERSION_KEY  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object destructure​(java.lang.Object structured, SessionFactoryImplementor factory)
      Convert the previous structured form of the item back into its item form.
      java.lang.Object structure​(java.lang.Object item)
      Convert the cache item into its "structured" form.
      • Methods inherited from class java.lang.Object

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

      • StructuredCacheEntry

        public StructuredCacheEntry​(EntityPersister persister)
        Constructs a StructuredCacheEntry strategy
        Parameters:
        persister - The persister whose data needs to be structured.
    • Method Detail

      • destructure

        public java.lang.Object destructure​(java.lang.Object structured,
                                            SessionFactoryImplementor factory)
        Description copied from interface: CacheEntryStructure
        Convert the previous structured form of the item back into its item form.
        Specified by:
        destructure in interface CacheEntryStructure
        Parameters:
        structured - The structured form.
        factory - The session factory.
        Returns:
        The item
      • structure

        public java.lang.Object structure​(java.lang.Object item)
        Description copied from interface: CacheEntryStructure
        Convert the cache item into its "structured" form. Perfectly valid to return the item as-is.
        Specified by:
        structure in interface CacheEntryStructure
        Parameters:
        item - The item to structure.
        Returns:
        The structured form.