public interface CustomizationSupplier<T>
CacheLoader. An implementation must implement proper a
Implementations of this class that should be usable within the XML configuration
need to implement
Serializable. This is not done so in this interface since
there may be suppliers which are used within the program that are intentionally not
serializable, such as
T supply(CacheManager manager) throws Exception
Developer note: The interface lacks context where the customization is used, e.g. the cache name. With the cache name, different customizations could share data or expose themselves
manager- The manager can be used to retrieve the class loader or additional properties needed to configure the customization.
Exception- the method may throw arbitrary exceptions. The exception is wrapped into a
CacheExceptionand rethrown. When the creation of a customization fails, the cache will not be usable.
cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.