Class ORecordCacheWeakRefs

All Implemented Interfaces:
ORecordCache

public class ORecordCacheWeakRefs extends OAbstractMapCache<WeakHashMap<ORID,WeakReference<ORecord>>> implements ORecordCache
Author:
Artem Orobets (enisher-at-gmail.com)
  • Constructor Details

    • ORecordCacheWeakRefs

      public ORecordCacheWeakRefs()
  • Method Details

    • get

      public ORecord get(ORID rid)
      Description copied from interface: ORecordCache
      Look up for record in cache by it's identifier
      Specified by:
      get in interface ORecordCache
      Parameters:
      rid - unique identifier of record
      Returns:
      record stored in cache if any, otherwise - null
    • put

      public ORecord put(ORecord record)
      Description copied from interface: ORecordCache
      Push record to cache. Identifier of record used as access key
      Specified by:
      put in interface ORecordCache
      Parameters:
      record - record that should be cached
      Returns:
      previous version of record
    • remove

      public ORecord remove(ORID rid)
      Description copied from interface: ORecordCache
      Remove record with specified identifier
      Specified by:
      remove in interface ORecordCache
      Parameters:
      rid - unique identifier of record
      Returns:
      record stored in cache if any, otherwise - null
    • clearRecords

      public void clearRecords()
      Specified by:
      clearRecords in interface ORecordCache
    • shutdown

      public void shutdown()
      Description copied from interface: ORecordCache
      All operations running at cache destruction stage
      Specified by:
      shutdown in interface ORecordCache
      Overrides:
      shutdown in class OAbstractMapCache<WeakHashMap<ORID,WeakReference<ORecord>>>