Package org.cache2k.config
Interface CustomizationSupplier<T>
-
- Type Parameters:
T- the type for the customization. Typically, extendsCustomization, but can beExecutoras well
- All Known Subinterfaces:
DataCustomizationSupplier<K,V,T>
- All Known Implementing Classes:
CustomizationReferenceSupplier,CustomizationSupplierByClassName
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CustomizationSupplier<@NonNull T>
Supplies cache customizations likeExpiryPolicyorCacheLoader. An implementation must implement proper ahashCodeandequalsmethod.Implementations of this class need to be bean compatible and should only define supported property types. This is needed if this supplier is used within a default configuration do a deep copy. If suppliers do not support this they must not have a default constructor, such as
CustomizationReferenceSupplier.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tsupply(CacheBuildContext<?,?> buildContext)Create or return an existing customization instance.
-
-
-
Method Detail
-
supply
T supply(CacheBuildContext<?,?> buildContext)
Create or return an existing customization instance.- Returns:
- created customization, never
null
-
-