Interface IdentifiedCache

All Known Implementing Classes:
CacheRepository, DataSetListTreeRepository.ToLoadLater, IdentifiedCacheDelegate, StrongIdentifiedCache, WeakIdentifiedCache

public interface IdentifiedCache
  • Method Details

    • computeIfAbsent

      @Nonnull default <T extends Identified> T computeIfAbsent(@Nonnull Class<T> type, @Nonnull UUID id, @Nonnull Function<UUID,? extends T> sourceFunc)
      Returns value if it is already present in the cache. Invokes function otherwise. Function should not return null. Caches new provided value.
    • tryComputeIfAbsent

      @Nullable default <T extends Identified> T tryComputeIfAbsent(@Nonnull Class<T> type, @Nonnull UUID id, @Nonnull Function<UUID,? extends T> sourceFunc)
      Returns value if it is already present in the cache. Invokes function otherwise. Function may return null. Caches new provided value (if it is not null).
    • getIfPresent

      @Nullable <T extends Identified> T getIfPresent(@Nonnull Class<T> type, @Nonnull UUID id)
    • put

      <T extends Identified> void put(@Nonnull Class<T> type, @Nonnull T identified)
    • clear

      void clear()