Package com.atlassian.bamboo.plan.cache
Class ImmutableCacheResultsImpl<T>
java.lang.Object
com.atlassian.bamboo.plan.cache.ImmutableCacheResultsImpl<T>
- Type Parameters:
T-
- All Implemented Interfaces:
ImmutableCacheResults<T>
Encapsulates results from cache, offering additional information about cache misses and hits.
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableCacheResultsImpl(@NotNull Collection<T> results, @NotNull Collection<T> cacheMisses) -
Method Summary
Modifier and TypeMethodDescription@NotNull com.google.common.collect.ImmutableSet<T> The result items that were found in the cache.@NotNull com.google.common.collect.ImmutableSet<T> The result items that were not found in the cache and had to be loaded from database.@NotNull com.google.common.collect.ImmutableSet<T> All items found either in the cache or that had to be loaded from database.stream()Stream over all results exposed viaImmutableCacheResults.getResults()
-
Constructor Details
-
ImmutableCacheResultsImpl
public ImmutableCacheResultsImpl(@NotNull @NotNull Collection<T> results, @NotNull @NotNull Collection<T> cacheMisses)
-
-
Method Details
-
getCacheHits
Description copied from interface:ImmutableCacheResultsThe result items that were found in the cache.- Specified by:
getCacheHitsin interfaceImmutableCacheResults<T>- Returns:
- The result items that were found in the cache.
-
getCacheMisses
Description copied from interface:ImmutableCacheResultsThe result items that were not found in the cache and had to be loaded from database.- Specified by:
getCacheMissesin interfaceImmutableCacheResults<T>- Returns:
- The result items that were not found in the cache and had to be loaded from database.
-
getResults
Description copied from interface:ImmutableCacheResultsAll items found either in the cache or that had to be loaded from database.- Specified by:
getResultsin interfaceImmutableCacheResults<T>- Returns:
- All items found either in the cache or that had to be loaded from database.
-
stream
Description copied from interface:ImmutableCacheResultsStream over all results exposed viaImmutableCacheResults.getResults()- Specified by:
streamin interfaceImmutableCacheResults<T>- Returns:
- A stream over all results.
-