Class InMemoryOAuthClientMetadataCache

java.lang.Object
com.revetsec.oauth.server.InMemoryOAuthClientMetadataCache
All Implemented Interfaces:
OAuthClientMetadataCache

@ThreadSafe @CheckReturnValue public final class InMemoryOAuthClientMetadataCache extends Object implements OAuthClientMetadataCache
Bounded single-process optional cache with timed interruptible locking and approximate LRU eviction. The reused map is private: all access is serialized, entries are evicted before insertion and every mutation drains its bounded maintenance work. No listener, loader, worker thread or general map is exposed. There are at most maximumEntries retained records, each syntax-bounded to a 16384-byte encrypted envelope. Reads/replacements cost bounded local work; lock waits consume the supplied budget. Expiry/freshness is checked by the core before use, not asserted by this storage cache. It may evict at any time and has no durability. Sharing one instance shares only in-process storage; separate factories return separate caches. Applications may supply a distributed implementation through the metadata policy's cache option. The raw reused map has only a maintenance capacity target under concurrent writes. This wrapper supplies the strict entry bound; keep its map private and every access under its budgeted lock.
Since:
1.0.0
Author:
Mark Allen