public class FixedSizedCache<K,V>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
FixedSizedCache.CacheItemRetriever<V> |
Constructor and Description |
---|
FixedSizedCache(int maxSize,
java.time.Duration staleTime) |
Modifier and Type | Method and Description |
---|---|
int |
getEntryCount() |
V |
getItem(K key) |
V |
getItem(K key,
FixedSizedCache.CacheItemRetriever<V> retriever)
Cache'de veri bulunuyorsa ilgili veri dönüyor, bulunmuyor ise retriever ile veri çekiliyor ve cache'e konuluyor.
|
int |
getMaxSize() |
void |
put(K key,
V item) |
public FixedSizedCache(int maxSize, java.time.Duration staleTime)
public int getMaxSize()
public int getEntryCount()
public V getItem(K key, FixedSizedCache.CacheItemRetriever<V> retriever) throws java.lang.Exception
key
- retriever
- java.lang.Exception
Copyright © 2025. All rights reserved.