本文整理匯總了Java中org.apache.shiro.cache.Cache.keys方法的典型用法代碼示例。如果您正苦於以下問題:Java Cache.keys方法的具體用法?Java Cache.keys怎麽用?Java Cache.keys使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.shiro.cache.Cache
的用法示例。
在下文中一共展示了Cache.keys方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: clearAllCachedAuthorizationInfo
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
/**
* 清除所有用戶授權信息緩存.
*/
public void clearAllCachedAuthorizationInfo() {
if (logger.isDebugEnabled()) {
logger.debug("clearAllCachedAuthorizationInfo() - start"); //$NON-NLS-1$
}
Cache<Object, AuthorizationInfo> cache = getAuthorizationCache();
if (cache != null) {
for (Object key : cache.keys()) {
cache.remove(key);
}
}
if (logger.isDebugEnabled()) {
logger.debug("clearAllCachedAuthorizationInfo() - end"); //$NON-NLS-1$
}
}
示例2: clearAllCachedAuthorizationInfo
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
/**
* 清除所有用戶授權信息緩存.
*/
public void clearAllCachedAuthorizationInfo() {
Cache<Object, AuthorizationInfo> cache = getAuthorizationCache();
if (cache != null) {
for (Object key : cache.keys()) {
cache.remove(key);
}
}
}
示例3: removeAll
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
/**
* 從緩存中移除所有
*
* @param cacheName
*/
public static void removeAll(String cacheName) {
Cache<String, Object> cache = getCache(cacheName);
Set<String> keys = cache.keys();
for (Iterator<String> it = keys.iterator(); it.hasNext(); ) {
cache.remove(it.next());
}
logger.info("清理緩存: {} => {}", cacheName, keys);
}
示例4: removeAll
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
/**
* 從緩存中移除所有
* @param cacheName
*/
public static void removeAll(String cacheName) {
Cache<String, Object> cache = getCache(cacheName);
Set<String> keys = cache.keys();
for (Iterator<String> it = keys.iterator(); it.hasNext();){
cache.remove(it.next());
}
logger.info("清理緩存: {} => {}", cacheName, keys);
}
示例5: removeAll
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
/**
* 從緩存中移除所有
*
* @param cacheName
*/
public static void removeAll(String cacheName) {
Cache<String, Object> cache = getCache(cacheName);
Set<String> keys = cache.keys();
for (Iterator<String> it = keys.iterator(); it.hasNext(); ) {
cache.remove(it.next());
}
logger.info("清理緩存: {} => {}", cacheName, keys);
}
示例6: clearAllCachedAuthorizationInfo
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
public void clearAllCachedAuthorizationInfo() {
Cache<Object, AuthorizationInfo> cache = getAuthorizationCache();
if (cache != null) {
LOG.info("cache: {}", cache);
for (Object key : cache.keys()) {
LOG.info("remove {}", key);
cache.remove(key);
}
}
}
示例7: clearAllCachedAuthorizationInfo
import org.apache.shiro.cache.Cache; //導入方法依賴的package包/類
/**
* 清除所有用戶授權信息緩存.
*/
public void clearAllCachedAuthorizationInfo() {
Cache<Object, AuthorizationInfo> cache = getAuthorizationCache();
if (cache != null) {
for (Object key : cache.keys()) {
cache.remove(key);
}
}
}