Class LocalCacheService

java.lang.Object
org.talend.sdk.component.runtime.manager.service.LocalCacheService
All Implemented Interfaces:
Serializable, org.talend.sdk.component.api.service.cache.LocalCache

public class LocalCacheService extends Object implements org.talend.sdk.component.api.service.cache.LocalCache, Serializable
Implementation of LocalCache with in memory concurrent map.
See Also:
  • Constructor Details

  • Method Details

    • evict

      public void evict(String key)
      Evict an object.
      Specified by:
      evict in interface org.talend.sdk.component.api.service.cache.LocalCache
      Parameters:
      key - key to evict.
    • evictIfValue

      public void evictIfValue(String key, Object expected)
      Specified by:
      evictIfValue in interface org.talend.sdk.component.api.service.cache.LocalCache
    • computeIfAbsent

      public <T> T computeIfAbsent(Class<T> expectedClass, String key, Predicate<org.talend.sdk.component.api.service.cache.LocalCache.Element> toRemove, long timeoutMs, Supplier<T> value)
      Specified by:
      computeIfAbsent in interface org.talend.sdk.component.api.service.cache.LocalCache
    • computeIfAbsent

      public <T> T computeIfAbsent(Class<T> expectedClass, String key, Predicate<org.talend.sdk.component.api.service.cache.LocalCache.Element> toRemove, Supplier<T> value)
      Specified by:
      computeIfAbsent in interface org.talend.sdk.component.api.service.cache.LocalCache
    • computeIfAbsent

      public <T> T computeIfAbsent(Class<T> expectedClass, String key, long timeoutMs, Supplier<T> value)
      Specified by:
      computeIfAbsent in interface org.talend.sdk.component.api.service.cache.LocalCache
    • computeIfAbsent

      public <T> T computeIfAbsent(Class<T> expectedClass, String key, Supplier<T> value)
      Specified by:
      computeIfAbsent in interface org.talend.sdk.component.api.service.cache.LocalCache
    • release

      @PreDestroy public void release()
    • clean

      public void clean()