Class StrongIdentifiedCache
java.lang.Object
org.qubership.atp.dataset.db.utils.StrongIdentifiedCache
- All Implemented Interfaces:
IdentifiedCache
- Direct Known Subclasses:
DataSetListTreeRepository.ToLoadLater
-
Constructor Summary
ConstructorsConstructorDescriptionStrongIdentifiedCache(Map<Class<? extends Identified>, Map<UUID, ? extends Identified>> caches) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()<T extends Identified>
TcomputeIfAbsent(Class<T> type, UUID id, Function<UUID, ? extends T> sourceFunc) Returns value if it is already present in the cache.boolean<T extends Identified>
TgetIfPresent(Class<T> type, UUID id) inthashCode()<T extends Identified>
voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.qubership.atp.dataset.db.IdentifiedCache
tryComputeIfAbsent
-
Constructor Details
-
StrongIdentifiedCache
public StrongIdentifiedCache() -
StrongIdentifiedCache
public StrongIdentifiedCache(@Nullable Map<Class<? extends Identified>, Map<UUID, ? extends Identified>> caches)
-
-
Method Details
-
computeIfAbsent
@Nonnull public <T extends Identified> T computeIfAbsent(@Nonnull Class<T> type, @Nonnull UUID id, @Nonnull Function<UUID, ? extends T> sourceFunc) Description copied from interface:IdentifiedCacheReturns value if it is already present in the cache. Invokes function otherwise. Function should not return null. Caches new provided value.- Specified by:
computeIfAbsentin interfaceIdentifiedCache
-
getIfPresent
- Specified by:
getIfPresentin interfaceIdentifiedCache
-
put
- Specified by:
putin interfaceIdentifiedCache
-
clear
public void clear()- Specified by:
clearin interfaceIdentifiedCache
-
equals
-
hashCode
public int hashCode()
-