public class CompositeExpiryStrategy extends Object implements ExpiryStrategy
ExpiryStrategy
which contains other ExpiryStrategies. All method calls are delegated
to all contained strategies.ExpiryStrategy.ExpiryPressure
Constructor and Description |
---|
CompositeExpiryStrategy(ExpiryStrategy... expiryStrategies)
Creates a
CompositeExpiryStrategy which contains the given ExpiryStrategy s |
Modifier and Type | Method and Description |
---|---|
void |
performExpiry(CacheIteratorFactory cacheIteratorFactory,
TrackableCache cache,
boolean hasLRUOrdering,
ExpiryStrategy.ExpiryPressure expiryPressure)
Doesn't perform an expiry for itself but delegates the call to all contained
ExpiryStrategy s. |
public CompositeExpiryStrategy(ExpiryStrategy... expiryStrategies)
CompositeExpiryStrategy
which contains the given ExpiryStrategy
sexpiryStrategies
- the ExpiryStrategy
s which should be combined. Must not be null.public void performExpiry(CacheIteratorFactory cacheIteratorFactory, TrackableCache cache, boolean hasLRUOrdering, ExpiryStrategy.ExpiryPressure expiryPressure)
ExpiryStrategy
s.performExpiry
in interface ExpiryStrategy
cacheIteratorFactory
- A CacheIteratorFactory
that creates an Iterator
to the caches
entries. The Iterator
created using the CacheIteratorFactory
shall be used
to removed entries from the cache.cache
- the TrackableCache
the ExpiryStrategy
is assigned tohasLRUOrdering
- If this is true, the collection has an LRU ordering, implying that it
will iterate from the oldest to the newest entry.expiryPressure
- Indicates if the expiry call is urgent or not.Copyright © 2024 levigo holding gmbh. All rights reserved.