Class JaloTypeCacheUnit

  • All Implemented Interfaces:
    CacheValueLoader

    public abstract class JaloTypeCacheUnit
    extends AbstractCacheUnit
    Cache helper class to perform caching in Jalo. is invalidated every time any item with given typecode is modified
    • Constructor Detail

      • JaloTypeCacheUnit

        protected JaloTypeCacheUnit​(Cache cache,
                                    int typecode,
                                    java.lang.Object additionalKey,
                                    int invalidationType)
      • JaloTypeCacheUnit

        protected JaloTypeCacheUnit​(Cache cache,
                                    int typecode,
                                    java.lang.Object additionalKey)
    • Method Detail

      • getCached

        public java.lang.Object getCached()
        get the cached object from this cache unit. if it is not yet computed, this method blocks until it's computed.

        helper method which does exactly the same as AbstractCacheUnit.get(), but catches the exception and throws a RuntimeException (JaloSystemException) instead. because of that you don't have to add a try/catch block in your code.

        Returns:
        the object