Java Code Examples for org.wso2.carbon.identity.core.util.IdentityUtil#getIdentityCacheConfig()
The following examples show how to use
org.wso2.carbon.identity.core.util.IdentityUtil#getIdentityCacheConfig() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SessionDataStore.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
private boolean isTempCache(String type) { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, type); if (identityCacheConfig != null) { return identityCacheConfig.isTemporary(); } return false; }
Example 2
Source File: BaseCache.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
public BaseCache(String cacheName) { this.cacheName = cacheName; IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null && !identityCacheConfig.isDistributed()) { this.cacheName = CachingConstants.LOCAL_CACHE_PREFIX + cacheName; } }
Example 3
Source File: BaseCache.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
public boolean isEnabled() { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null) { return identityCacheConfig.isEnabled(); } return true; }
Example 4
Source File: BaseCache.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
public int getCacheTimeout() { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null && identityCacheConfig.getTimeout() > 0) { return identityCacheConfig.getTimeout(); } return -1; }
Example 5
Source File: BaseCache.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
public int getCapacity() { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null && identityCacheConfig.getCapacity() > 0) { return identityCacheConfig.getCapacity(); } return -1; }
Example 6
Source File: BaseCache.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
public BaseCache(String cacheName) { this.cacheName = cacheName; identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null && !identityCacheConfig.isDistributed()) { this.cacheName = CachingConstants.LOCAL_CACHE_PREFIX + cacheName; } }
Example 7
Source File: BaseCache.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
public BaseCache(String cacheName, boolean isTemp) { this.cacheName = cacheName; identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null) { if (!identityCacheConfig.isDistributed()) { this.cacheName = CachingConstants.LOCAL_CACHE_PREFIX + cacheName; } identityCacheConfig.setTemporary(isTemp); } }
Example 8
Source File: BaseCache.java From carbon-identity with Apache License 2.0 | 5 votes |
public boolean isEnabled() { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null) { return identityCacheConfig.isEnabled(); } return true; }
Example 9
Source File: BaseCache.java From carbon-identity with Apache License 2.0 | 5 votes |
public int getCacheTimeout() { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null && identityCacheConfig.getTimeout() > 0) { return identityCacheConfig.getTimeout(); } return -1; }
Example 10
Source File: BaseCache.java From carbon-identity with Apache License 2.0 | 5 votes |
public int getCapacity() { IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName); if (identityCacheConfig != null && identityCacheConfig.getCapacity() > 0) { return identityCacheConfig.getCapacity(); } return -1; }