Class ScimSimpleCache<T>
java.lang.Object
org.cibseven.bpm.identity.impl.scim.ScimSimpleCache<T>
Thread-safe cache for SCIM GET responses with TTL-based expiration and max size eviction.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentHashMap<String,ScimSimpleCache.CacheEntry<T>> protected final longprotected final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidevictOldest(int count) Get a cached value by key.voidInvalidate all cache entries.voidPut a value in cache.intsize()Get the current number of cached entries.
-
Field Details
-
cache
-
maxSize
protected final int maxSize -
expirationTimeoutMs
protected final long expirationTimeoutMs
-
-
Constructor Details
-
ScimSimpleCache
public ScimSimpleCache(int maxSize, long expirationTimeoutMin)
-
-
Method Details
-
get
Get a cached value by key. Returns null if not found or expired. -
put
Put a value in cache. -
invalidateAll
public void invalidateAll()Invalidate all cache entries. -
size
public int size()Get the current number of cached entries. -
evictExpired
protected void evictExpired() -
evictOldest
protected void evictOldest(int count)
-