javax.cache.Caching.getCacheManagerFactory()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(8.4k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中javax.cache.Caching.getCacheManagerFactory()方法的一些代码示例,展示了Caching.getCacheManagerFactory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Caching.getCacheManagerFactory()方法的具体详情如下:
包路径:javax.cache.Caching
类名称:Caching
方法名:getCacheManagerFactory

Caching.getCacheManagerFactory介绍

暂无

代码示例

代码示例来源:origin: org.wso2.carbon.governance/org.wso2.carbon.governance.api

/**
 * Get the Cache Manager for Registry
 *
 * @return CacheManager is returned
 */
private static CacheManager getCacheManager() {
  return Caching.getCacheManagerFactory().getCacheManager(
      RegistryConstants.REGISTRY_CACHE_MANAGER);
}

代码示例来源:origin: org.wso2.carbon.devicemgt/org.wso2.carbon.policy.mgt.core

private static CacheManager getCacheManager() {
  return Caching.getCacheManagerFactory().getCacheManager(
      PolicyManagementConstants.DM_CACHE_MANAGER);
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.mgt

protected Cache<String, UserIdentityClaimsDO> getCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(InMemoryIdentityDataStore.IDENTITY_LOGIN_DATA_CACHE_MANAGER);
  Cache<String, UserIdentityClaimsDO> cache = manager.getCache(InMemoryIdentityDataStore.IDENTITY_LOGIN_DATA_CACHE);
  return cache;
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.governance

protected Cache<String, UserIdentityClaim> getCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(InMemoryIdentityDataStore.IDENTITY_LOGIN_DATA_CACHE_MANAGER);
  Cache<String, UserIdentityClaim> cache = manager.getCache(InMemoryIdentityDataStore.IDENTITY_LOGIN_DATA_CACHE);
  return cache;
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.security.mgt

/**
   * Returns the default "POX_ENABLED" cache
   */
  private Cache<String, String> getPOXCache() {
    CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);
    Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);
    return cache;
  }
}

代码示例来源:origin: wso2/carbon-identity-framework

/**
   * Returns the default "POX_ENABLED" cache
   */
  private Cache<String, String> getPOXCache() {
    CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);
    Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);
    return cache;
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.security.mgt

/**
 * Returns the default "POX_ENABLED" cache
 */
private Cache<String, String> getPOXCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);
  Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);
  return cache;
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.provider

/**
 * Getting existing cache if the cache available, else returns a newly created cache.
 * This logic handles by javax.cache implementation
 */
private Cache<K, V> getOpenIDCache() {
  CacheManager cacheManager = Caching.getCacheManagerFactory().getCacheManager(OPENID_CACHE_MANAGER);
  return cacheManager.getCache(openidCacheName);
}

代码示例来源:origin: org.wso2.carbon.identity.governance/org.wso2.carbon.identity.governance

protected Cache<String, UserIdentityClaim> getCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(InMemoryIdentityDataStore.IDENTITY_GOVERNANCE_DATA_CACHE_MANAGER);
  Cache<String, UserIdentityClaim> cache = manager.getCache(InMemoryIdentityDataStore.IDENTITY_GOVERNANCE_DATA_CACHE);
  return cache;
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.openid/org.wso2.carbon.identity.provider

/**
 * Getting existing cache if the cache available, else returns a newly created cache.
 * This logic handles by javax.cache implementation
 */
private Cache<K, V> getOpenIDCache() {
  CacheManager cacheManager = Caching.getCacheManagerFactory().getCacheManager(OPENID_CACHE_MANAGER);
  return cacheManager.getCache(openidCacheName);
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.security.mgt

/**
 * Returns the default "POX_ENABLED" cache
 */
private Cache<String, String> getPOXCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);
  Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);
  return cache;
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.security.mgt

/**
   * Returns the default "POX_ENABLED" cache
   */
  private Cache<String, String> getPOXCache() {
    CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);
    Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);
    return cache;
  }
}

代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.user.store.configuration

/**
 * Get the cache which holds the RandomPasswordContainer cache
 *
 * @return Cache object of RandomPasswordContainerCache
 */
public Cache<String, RandomPasswordContainer> getRandomPasswordContainerCache() {
  return Caching.getCacheManagerFactory().getCacheManager(
      UserStoreConfigurationConstant.SECONDARY_STORAGE_CACHE_MANAGER).
      getCache(UserStoreConfigurationConstant.RANDOM_PASSWORD_CONTAINER_CACHE);
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.sts.store

/**
 * Getting existing cache if the cache available, else returns a newly created cache.
 * This logic handles by javax.cache implementation
 */
public static Cache<String, SerializableToken> getTokenCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(STSMgtConstants.TOKEN_CACHE_MANAGER);
  return manager.getCache(STSMgtConstants.TOKEN_CACHE_ID);
}

代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.sts/org.wso2.carbon.identity.sts.store

/**
 * Getting existing cache if the cache available, else returns a newly created cache.
 * This logic handles by javax.cache implementation
 */
public static Cache<String, SerializableToken> getTokenCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(STSMgtConstants.TOKEN_CACHE_MANAGER);
  return manager.getCache(STSMgtConstants.TOKEN_CACHE_ID);
}

代码示例来源:origin: wso2/carbon-identity-framework

/**
 * Get the cache which holds the RandomPasswordContainer cache
 *
 * @return Cache object of RandomPasswordContainerCache
 */
public Cache<String, RandomPasswordContainer> getRandomPasswordContainerCache() {
  return Caching.getCacheManagerFactory().getCacheManager(
      UserStoreConfigurationConstant.SECONDARY_STORAGE_CACHE_MANAGER).
      getCache(UserStoreConfigurationConstant.RANDOM_PASSWORD_CONTAINER_CACHE);
}

代码示例来源:origin: wso2/carbon-identity-framework

/**
 * Returns the default "POX_ENABLED" cache
 */
private Cache<String, String> getPOXCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);
  Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);
  return cache;
}

代码示例来源:origin: wso2/carbon-identity-framework

protected Cache<String, UserIdentityClaimsDO> getCache() {
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(InMemoryIdentityDataStore.IDENTITY_LOGIN_DATA_CACHE_MANAGER);
  Cache<String, UserIdentityClaimsDO> cache = manager.getCache(InMemoryIdentityDataStore.IDENTITY_LOGIN_DATA_CACHE);
  return cache;
}

代码示例来源:origin: org.wso2.carbon.identity.agent.entitlement.mediator/org.wso2.carbon.identity.entitlement.proxy

/**
 * Return an instance of a named cache that is common to all tenants.
 *
 * @param name the name of the cache.
 * @return the named cache instance.
 */
private Cache<IdentityCacheKey, IdentityCacheEntry> getCommonCache() {
  // TODO Should verify the cache creation done per tenant or as below
  // We create a single cache for all tenants. It is not a good choice to create per-tenant
  // caches in this case. We qualify tenants by adding the tenant identifier in the cache key.
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(ProxyConstants.DECISION_CACHE);
  return manager.getCache(ProxyConstants.DECISION_CACHE);
}

代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement.proxy

/**
 * Return an instance of a named cache that is common to all tenants.
 *
 * @param name the name of the cache.
 * @return the named cache instance.
 */
private Cache<IdentityCacheKey, IdentityCacheEntry> getCommonCache() {
  // TODO Should verify the cache creation done per tenant or as below
  // We create a single cache for all tenants. It is not a good choice to create per-tenant
  // caches in this case. We qualify tenants by adding the tenant identifier in the cache key.
  CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(ProxyConstants.DECISION_CACHE);
  return manager.getCache(ProxyConstants.DECISION_CACHE);
}

相关文章