Class TenantSpecificFileBasedCache<T>

  • Direct Known Subclasses:
    TenantSpecificPropertyGroupCache, TenantSpecificSearchParameterCache

    public abstract class TenantSpecificFileBasedCache<T>
    extends java.lang.Object
    This class is a parameterized abstract base class to be used for situations where we need to implement a tenant-specific cache of file-based objects. Examples include: configuration parameters, structure definitions, search parameters, etc.
    • Constructor Detail

      • TenantSpecificFileBasedCache

        public TenantSpecificFileBasedCache()
      • TenantSpecificFileBasedCache

        public TenantSpecificFileBasedCache​(java.lang.String cacheType)
    • Method Detail

      • clearCache

        public void clearCache()
        Clears the entire cache. This might be useful during testing when you need to clear out the entire cache and re-load.
      • getCacheEntryFilename

        public abstract java.lang.String getCacheEntryFilename​(java.lang.String tenantId)
      • createCachedObject

        public abstract T createCachedObject​(java.io.File file)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getCachedObjectForTenant

        public T getCachedObjectForTenant​(java.lang.String tenantId)
                                   throws java.lang.Exception
        Parameters:
        tenantId -
        Returns:
        the cached object for the tenant or null if it could not be found
        Throws:
        java.lang.Exception