Class JCacheCodelistClient.Builder

    • Field Detail

      • reloadReferences

        protected boolean reloadReferences
      • reloadDependencies

        protected boolean reloadDependencies
      • expiryTime

        protected java.time.Duration expiryTime
    • Constructor Detail

      • Builder

        public Builder​(javax.cache.Cache cache)
    • Method Detail

      • withCachedDataProvider

        public JCacheCodelistClient.Builder withCachedDataProvider​(DataProvider dataProvider,
                                                                   javax.cache.Cache providerCache)
        Set instance of data provider implementation and wrap it with CachedDataProvider.It caches all provider responses for time defined by withExpiryTime(java.time.Duration) method.This is mandatory attribute. Application throws IllegalArgumentException when no data provider is set. Be aware that provider cache must me different instance than codelist cache.
        Parameters:
        dataProvider - data provider
        providerCache -
        Returns:
        builder
      • withExpiryTime

        public JCacheCodelistClient.Builder withExpiryTime​(java.time.Duration expiryTime)
        Set expiry time.Default value is 10 minutes.It means that every codelist expired in this time and will be refreshed when it was changed.This setting is applicable only for Cache2kCodelistClientImpl implementation.
        Parameters:
        expiryTime -
        Returns:
        builder
      • withoutReloadDependecies

        public JCacheCodelistClient.Builder withoutReloadDependecies()
        Don't reload all referenced codelists (transitive dependencies) from changed codelist.This configuration is applied only to JCacheCodelistClientImpl. Default value: true
        Returns: