MemoryTokenCacheStore Class

  • java.lang.Object

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<TokenCacheItem> getAll()

Get all cached token items.

TokenCacheItem 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:

key -

CacheKey

Returns:

true if it exists

getAll

public Iterator getAll()

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:

key -

CacheKey

Returns:

Token cache item

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:

key -

CacheKey

setItem

public void setItem(String key, TokenCacheItem item)

Sets item.

Overrides:

MemoryTokenCacheStore.setItem(String key, TokenCacheItem item)

Parameters:

key -

CacheKey

item - Cache item

Applies to