Class OAbstractMapCache<T extends Map<ORID,?>>

java.lang.Object
com.orientechnologies.orient.core.cache.OAbstractMapCache<T>
All Implemented Interfaces:
ORecordCache
Direct Known Subclasses:
ORecordCacheSoftRefs, ORecordCacheWeakRefs

public abstract class OAbstractMapCache<T extends Map<ORID,?>> extends Object implements ORecordCache
Author:
Artem Orobets (enisher-at-gmail.com)
  • Field Details

    • cache

      protected T extends Map<ORID,?> cache
  • Constructor Details

    • OAbstractMapCache

      public OAbstractMapCache(T cache)
  • Method Details

    • startup

      public void startup()
      Description copied from interface: ORecordCache
      All operations running at cache initialization stage
      Specified by:
      startup 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
    • clear

      public void clear()
      Description copied from interface: ORecordCache
      Remove all records from cache
      Specified by:
      clear in interface ORecordCache
    • size

      public int size()
      Description copied from interface: ORecordCache
      Total number of stored records
      Specified by:
      size in interface ORecordCache
      Returns:
      non-negative number
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: ORecordCache
      Tell whether cache is enabled
      Specified by:
      isEnabled in interface ORecordCache
      Returns:
      true if cache enabled at call time, otherwise - false
    • disable

      public boolean disable()
      Description copied from interface: ORecordCache
      Disable cache. None of record management methods will cause effect on cache in disabled state. Only cache info methods available at that state.
      Specified by:
      disable in interface ORecordCache
      Returns:
      true - if disabled, false - otherwise (already disabled)
    • enable

      public boolean enable()
      Description copied from interface: ORecordCache
      Enable cache
      Specified by:
      enable in interface ORecordCache
      Returns:
      true - if enabled, false - otherwise (already enabled)
    • keys

      public Collection<ORID> keys()
      Description copied from interface: ORecordCache
      Keys of all stored in cache records
      Specified by:
      keys in interface ORecordCache
      Returns:
      keys of records