Package com.okta.sdk.impl.cache
Class DisabledCacheManager
java.lang.Object
com.okta.sdk.impl.cache.DisabledCacheManager
- All Implemented Interfaces:
CacheManager
A disabled implementation that does nothing. This alleviates a CacheManager user (component) from ever needing to
check for null. Non-null guarantees reduce a program's cyclomatic complexity and simplify testing.
- Since:
- 0.5.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<K,
V> Cache <K, V> Always returns aDisabledCache
instance to ensure non-null guarantees.
-
Constructor Details
-
DisabledCacheManager
public DisabledCacheManager()
-
-
Method Details
-
getCache
Always returns aDisabledCache
instance to ensure non-null guarantees.- Specified by:
getCache
in interfaceCacheManager
- Type Parameters:
K
- type of cache keyV
- type of cache value- Parameters:
name
- the name of the cache to acquire.- Returns:
- returns a
DisabledCache
instance to ensure non-null guarantees.
-