public class CachingServiceProviderConsumerStore extends Object implements com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Need to provide a cache however since lookups of a single consumer have to be fast, since everytime and OAUTH request comes in, we need to check if the consumer for this request has been added by an admin.
Constructor and Description |
---|
CachingServiceProviderConsumerStore(com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore 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 |
get(String key) |
Iterable<com.atlassian.oauth.Consumer> |
getAll() |
void |
put(com.atlassian.oauth.Consumer consumer) |
void |
remove(String key) |
public CachingServiceProviderConsumerStore(com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore 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 void put(com.atlassian.oauth.Consumer consumer) throws com.atlassian.oauth.serviceprovider.StoreException
put
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
com.atlassian.oauth.serviceprovider.StoreException
public com.atlassian.oauth.Consumer get(String key) throws com.atlassian.oauth.serviceprovider.StoreException
get
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
com.atlassian.oauth.serviceprovider.StoreException
public Iterable<com.atlassian.oauth.Consumer> getAll() throws com.atlassian.oauth.serviceprovider.StoreException
getAll
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
com.atlassian.oauth.serviceprovider.StoreException
public void remove(String key) throws com.atlassian.oauth.serviceprovider.StoreException
remove
in interface com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore
com.atlassian.oauth.serviceprovider.StoreException
Copyright © 2002-2017 Atlassian. All Rights Reserved.