MemoryTokenCacheStore Class
- java.
lang. Object - Serializable
- ITokenCacheStore
- com.
microsoft. aad. adal. MemoryTokenCacheStore
- com.
public class MemoryTokenCacheStore implements ITokenCacheStore
tokenCacheItem is not persisted. Memory cache does not keep static items.
Constructor Summary
Constructor | Description |
---|---|
MemoryTokenCacheStore() |
Creates MemoryTokenCacheStore. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String key)
Checks if cache key exists. |
Iterator<Token |
getAll()
Get all cached token items. |
Token |
getItem(String key)
Get cache item. |
void |
removeAll()
Removes all items from cache. |
void |
removeItem(String key)
Removes item with key. |
void |
setItem(String key, TokenCacheItem item)
Sets item. |
Constructor Details
MemoryTokenCacheStore
public MemoryTokenCacheStore()
Creates MemoryTokenCacheStore.
Method Details
contains
public boolean contains(String key)
Checks if cache key exists.
Overrides:
MemoryTokenCacheStore.contains(String key)Parameters:
Returns:
getAll
public Iterator
Get all cached token items.
Overrides:
MemoryTokenCacheStore.getAll()Returns:
Iterator of TokenCacheItems in the cache.
getItem
public TokenCacheItem getItem(String key)
Get cache item.
Overrides:
MemoryTokenCacheStore.getItem(String key)Parameters:
Returns:
removeAll
public void removeAll()
Removes all items from cache.
Overrides:
MemoryTokenCacheStore.removeAll()removeItem
public void removeItem(String key)
Removes item with key.
Overrides:
MemoryTokenCacheStore.removeItem(String key)Parameters:
setItem
public void setItem(String key, TokenCacheItem item)
Sets item.
Overrides:
MemoryTokenCacheStore.setItem(String key, TokenCacheItem item)Parameters:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for