public class CachingConsumerTokenStore extends Object implements com.atlassian.oauth.consumer.ConsumerTokenStore, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Writes will clear the cache value, to be lazy loaded on the next get.
Constructor and Description |
---|
CachingConsumerTokenStore(com.atlassian.oauth.consumer.ConsumerTokenStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
clearCaches(ClearCacheEvent event) |
void |
destroy() |
com.atlassian.oauth.consumer.ConsumerToken |
get(com.atlassian.oauth.consumer.ConsumerTokenStore.Key key) |
Map<com.atlassian.oauth.consumer.ConsumerTokenStore.Key,com.atlassian.oauth.consumer.ConsumerToken> |
getConsumerTokens(String consumerKey) |
com.atlassian.oauth.consumer.ConsumerToken |
put(com.atlassian.oauth.consumer.ConsumerTokenStore.Key key,
com.atlassian.oauth.consumer.ConsumerToken token) |
void |
remove(com.atlassian.oauth.consumer.ConsumerTokenStore.Key key) |
void |
removeTokensForConsumer(String consumerKey) |
public CachingConsumerTokenStore(com.atlassian.oauth.consumer.ConsumerTokenStore delegateStore, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.cache.CacheManager cacheManager)
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
@EventListener public void clearCaches(ClearCacheEvent event)
public com.atlassian.oauth.consumer.ConsumerToken get(com.atlassian.oauth.consumer.ConsumerTokenStore.Key key)
get
in interface com.atlassian.oauth.consumer.ConsumerTokenStore
public Map<com.atlassian.oauth.consumer.ConsumerTokenStore.Key,com.atlassian.oauth.consumer.ConsumerToken> getConsumerTokens(String consumerKey)
getConsumerTokens
in interface com.atlassian.oauth.consumer.ConsumerTokenStore
public com.atlassian.oauth.consumer.ConsumerToken put(com.atlassian.oauth.consumer.ConsumerTokenStore.Key key, com.atlassian.oauth.consumer.ConsumerToken token)
put
in interface com.atlassian.oauth.consumer.ConsumerTokenStore
public void remove(com.atlassian.oauth.consumer.ConsumerTokenStore.Key key)
remove
in interface com.atlassian.oauth.consumer.ConsumerTokenStore
public void removeTokensForConsumer(String consumerKey)
removeTokensForConsumer
in interface com.atlassian.oauth.consumer.ConsumerTokenStore
Copyright © 2002-2024 Atlassian. All Rights Reserved.