org.surfnet.oaaas.model
Class TokenResponseCacheImpl
java.lang.Object
org.surfnet.oaaas.model.TokenResponseCacheImpl
- All Implemented Interfaces:
- TokenResponseCache
public class TokenResponseCacheImpl
- extends Object
- implements TokenResponseCache
Very simple - but highly effective - TokenResponseCache implementation. Please carefully monitor the performance / cache hit-ratio
in production as the maxSize in combination with the expireTimeSeconds is important. If the maxSize is too small and the expireTimeSeconds to low
it will result in a cache that with each addition will try to make space (e.g. effectively only removing the oldes entry each time).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenResponseCacheImpl
public TokenResponseCacheImpl(int maxSize,
long expireTimeSeconds)
getVerifyToken
public VerifyTokenResponse getVerifyToken(String accessToken)
- Specified by:
getVerifyToken in interface TokenResponseCache
storeVerifyToken
public void storeVerifyToken(String accessToken,
VerifyTokenResponse tokenResponse)
- Specified by:
storeVerifyToken in interface TokenResponseCache
Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.