Package org.bgerp.cache

# Class Cache<C extends Cache<C>>

java.lang.Object
org.bgerp.cache.Cache<C>

Type Parameters:
  `C` - tricky generic for being a factory

Direct Known Subclasses:
  `CallboardCache`, `CustomerGroupCache`, `ParameterCache`, `ProcessQueueCache`, `ProcessTypeCache`, `UserCache`, `UserGroupRoleCache`, `UserNewsCache`

public abstract class Cache<C extends Cache<C>> extends Object
In-memory cache and factory of itself

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Cache()`
  Protected constructor, available only for children

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isValid()`
  Is the cache valid
  `protected abstract C`
  `newInstance()`
  Creates a new cache instance

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Cache

    protected Cache()
    Protected constructor, available only for children

- ## Method Details

  - ### newInstance

    protected abstract C newInstance()
    Creates a new cache instance
    Returns:
      the instance

  - ### isValid

    public boolean isValid()
    Is the cache valid
    Returns:
      the validity state