public class MemoryTokenCacheStore extends java.lang.Object implements ITokenCacheStore
Constructor and Description |
---|
MemoryTokenCacheStore()
Creates MemoryTokenCacheStore.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String key)
Checks if cache key exists.
|
java.util.Iterator<TokenCacheItem> |
getAll()
Get all cached token items.
|
TokenCacheItem |
getItem(java.lang.String key)
Get cache item.
|
void |
removeAll()
Removes all items from cache.
|
void |
removeItem(java.lang.String key)
Removes item with key.
|
void |
setItem(java.lang.String key,
TokenCacheItem item)
Sets item.
|
public MemoryTokenCacheStore()
public TokenCacheItem getItem(java.lang.String key)
ITokenCacheStore
getItem
in interface ITokenCacheStore
key
- CacheKey
public void setItem(java.lang.String key, TokenCacheItem item)
ITokenCacheStore
setItem
in interface ITokenCacheStore
key
- CacheKey
item
- Cache itempublic void removeItem(java.lang.String key)
ITokenCacheStore
removeItem
in interface ITokenCacheStore
key
- CacheKey
public void removeAll()
ITokenCacheStore
removeAll
in interface ITokenCacheStore
public boolean contains(java.lang.String key)
ITokenCacheStore
contains
in interface ITokenCacheStore
key
- CacheKey
public java.util.Iterator<TokenCacheItem> getAll()
ITokenCacheStore
getAll
in interface ITokenCacheStore
Iterator
of TokenCacheItem
s in the cache.