• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SimpleCache类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.alfresco.repo.cache.SimpleCache的典型用法代码示例。如果您正苦于以下问题:Java SimpleCache类的具体用法?Java SimpleCache怎么用?Java SimpleCache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SimpleCache类属于org.alfresco.repo.cache包,在下文中一共展示了SimpleCache类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: AbstractPropertyValueDAOImpl

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Default constructor.
 * <p>
 * This sets up the DAO accessors to bypass any caching to handle the case where the caches are not
 * supplied in the setters.
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
public AbstractPropertyValueDAOImpl()
{
    this.propertyClassDaoCallback = new PropertyClassCallbackDAO();
    this.propertyDateValueCallback = new PropertyDateValueCallbackDAO();
    this.propertyStringValueCallback = new PropertyStringValueCallbackDAO();
    this.propertyDoubleValueCallback = new PropertyDoubleValueCallbackDAO();
    this.propertySerializableValueCallback = new PropertySerializableValueCallbackDAO();
    this.propertyValueCallback = new PropertyValueCallbackDAO();
    this.propertyCallback = new PropertyCallbackDAO();
    
    this.propertyClassCache = new EntityLookupCache<Long, Class<?>, String>(propertyClassDaoCallback);
    this.propertyDateValueCache = new EntityLookupCache<Long, Date, Date>(propertyDateValueCallback);
    this.propertyStringValueCache = new EntityLookupCache<Long, String, Pair<String, Long>>(propertyStringValueCallback);
    this.propertyDoubleValueCache = new EntityLookupCache<Long, Double, Double>(propertyDoubleValueCallback);
    this.propertySerializableValueCache = new EntityLookupCache<Long, Serializable, Serializable>(propertySerializableValueCallback);
    this.propertyValueCache = new EntityLookupCache<Long, Serializable, Serializable>(propertyValueCallback);
    this.propertyCache = new EntityLookupCache<Long, Serializable, Serializable>(propertyCallback);
    
    this.propertyUniqueContextCache = (SimpleCache<CachePucKey, PropertyUniqueContextEntity>)new NullCache();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:28,代码来源:AbstractPropertyValueDAOImpl.java


示例2: findCacheValue

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Looks for a key that contains the toString() of the value
 */
private Object findCacheValue(SimpleCache<Serializable, ValueHolder<Serializable>> cache, Serializable key)
{
    Collection<Serializable> keys = cache.getKeys();
    for (Serializable keyInCache : keys)
    {
        String keyInCacheStr = keyInCache.toString();
        String keyStr = key.toString();
        if (keyInCacheStr.endsWith(keyStr))
        {
            Object value = TransactionalCache.getSharedCacheValue(cache, keyInCache);
            return value;
        }
    }
    return null;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:19,代码来源:NodeServiceTest.java


示例3: setAuthorityEntityCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_authority</b> lookups (optional).
 * 
 * @param authorityEntityCache      the cache of IDs to AclEntities
 */
public void setAuthorityEntityCache(SimpleCache<Serializable, Object> authorityEntityCache)
{
    this.authorityEntityCache = new EntityLookupCache<Long, AuthorityEntity, String>(
            authorityEntityCache,
            CACHE_REGION_AUTHORITY,
            authorityEntityDaoCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractAclCrudDAOImpl.java


示例4: setPermissionEntityCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_permission</b> lookups (optional).
 * 
 * @param permissionEntityCache     the cache of IDs to PermissionEntities
 */
public void setPermissionEntityCache(SimpleCache<Serializable, Object> permissionEntityCache)
{
    this.permissionEntityCache = new EntityLookupCache<Long, PermissionEntity, PermissionEntity>(
            permissionEntityCache,
            CACHE_REGION_PERMISSION,
            permissionEntityDaoCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractAclCrudDAOImpl.java


示例5: setPropertyClassCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_class</b> lookups (optional).
 * 
 * @param propertyClassCache            the cache of IDs to property classes
 */
public void setPropertyClassCache(SimpleCache<Serializable, Object> propertyClassCache)
{
    this.propertyClassCache = new EntityLookupCache<Long, Class<?>, String>(
            propertyClassCache,
            CACHE_REGION_PROPERTY_CLASS,
            propertyClassDaoCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例6: setPropertyDateValueCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_date_value</b> lookups (optional).
 * 
 * @param propertyDateValueCache        the cache of IDs to property values
 */
public void setPropertyDateValueCache(SimpleCache<Serializable, Object> propertyDateValueCache)
{
    this.propertyDateValueCache = new EntityLookupCache<Long, Date, Date>(
            propertyDateValueCache,
            CACHE_REGION_PROPERTY_DATE_VALUE,
            propertyDateValueCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例7: setPropertyStringValueCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_string_value</b> lookups (optional).
 * 
 * @param propertyStringValueCache      the cache of IDs to property string values
 */
public void setPropertyStringValueCache(SimpleCache<Serializable, Object> propertyStringValueCache)
{
    this.propertyStringValueCache = new EntityLookupCache<Long, String, Pair<String, Long>>(
            propertyStringValueCache,
            CACHE_REGION_PROPERTY_STRING_VALUE,
            propertyStringValueCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例8: setPropertyDoubleValueCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_double_value</b> lookups (optional).
 * 
 * @param propertyDoubleValueCache     the cache of IDs to property values
 */
public void setPropertyDoubleValueCache(SimpleCache<Serializable, Object> propertyDoubleValueCache)
{
    this.propertyDoubleValueCache = new EntityLookupCache<Long, Double, Double>(
            propertyDoubleValueCache,
            CACHE_REGION_PROPERTY_DOUBLE_VALUE,
            propertyDoubleValueCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例9: setPropertySerializableValueCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_serializable_value</b> lookups (optional).
 * 
 * @param propertySerializableValueCache     the cache of IDs to property values
 */
public void setPropertySerializableValueCache(SimpleCache<Serializable, Object> propertySerializableValueCache)
{
    this.propertySerializableValueCache = new EntityLookupCache<Long, Serializable, Serializable>(
            propertySerializableValueCache,
            CACHE_REGION_PROPERTY_SERIALIZABLE_VALUE,
            propertySerializableValueCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例10: setPropertyValueCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_value</b> lookups (optional).
 * 
 * @param propertyValueCache     the cache of IDs to property values
 */
public void setPropertyValueCache(SimpleCache<Serializable, Object> propertyValueCache)
{
    this.propertyValueCache = new EntityLookupCache<Long, Serializable, Serializable>(
            propertyValueCache,
            CACHE_REGION_PROPERTY_VALUE,
            propertyValueCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例11: setPropertyCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_prop_root</b> lookups (optional).
 * 
 * @param propertyCache     the cache of IDs to property values
 */
public void setPropertyCache(SimpleCache<Serializable, Object> propertyCache)
{
    this.propertyCache = new EntityLookupCache<Long, Serializable, Serializable>(
            propertyCache,
            CACHE_REGION_PROPERTY,
            propertyCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractPropertyValueDAOImpl.java


示例12: setLocaleEntityCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache that maintains the ID-Locale mappings and vice-versa (bi-directional)
 * 
 * @param localeEntityCache        the cache
 */
public void setLocaleEntityCache(SimpleCache<Long, String> localeEntityCache)
{
    this.localeEntityCache = new EntityLookupCache<Long, String, String>(
            localeEntityCache,
            CACHE_REGION_LOCALE,
            new LocaleEntityCallbackDAO());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractLocaleDAOImpl.java


示例13: setTenantEntityCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache to use for <b>alf_tenant</b> lookups (optional).
 * 
 * @param tenantEntityCache      the cache of tenantDomains to TenantEntities
 */
public void setTenantEntityCache(SimpleCache<Serializable, Object> tenantEntityCache)
{
    this.tenantEntityCache = new EntityLookupCache<String, TenantEntity, Serializable>(
            tenantEntityCache,
            tenantEntityDaoCallback);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:AbstractTenantAdminDAOImpl.java


示例14: setNamespaceCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache that maintains the ID-Namespace mappings and vice-versa.
 * 
 * @param namespaceCache        the cache
 */
public void setNamespaceCache(SimpleCache<Long, String> namespaceCache)
{
    this.namespaceCache = new EntityLookupCache<Long, String, String>(
            namespaceCache,
            CACHE_REGION_NAMESPACE,
            new NamespaceCallbackDAO());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractQNameDAOImpl.java


示例15: setQnameCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache that maintains the ID-Namespace mappings and vice-versa.
 * 
 * @param qnameCache            the cache
 */
public void setQnameCache(SimpleCache<Long, QName> qnameCache)
{
    this.qnameCache = new EntityLookupCache<Long, QName, QName>(
            qnameCache,
            CACHE_REGION_QNAME,
            new QNameCallbackDAO());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractQNameDAOImpl.java


示例16: setEncodingEntityCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache that maintains the ID-Encoding mappings and vice-versa (bi-directional)
 * 
 * @param encodingEntityCache        the cache
 */
public void setEncodingEntityCache(SimpleCache<Long, String> encodingEntityCache)
{
    this.encodingEntityCache = new EntityLookupCache<Long, String, String>(
            encodingEntityCache,
            CACHE_REGION_ENCODING,
            new EncodingEntityCallbackDAO());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractEncodingDAOImpl.java


示例17: setContentDataCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * @param contentDataCache              the cache of IDs to ContentData and vice versa
 */
public void setContentDataCache(SimpleCache<Long, ContentData> contentDataCache)
{
    this.contentDataCache = new EntityLookupCache<Long, ContentData, Serializable>(
            contentDataCache,
            CACHE_REGION_CONTENT_DATA,
            contentDataCallbackDAO);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:11,代码来源:AbstractContentDataDAOImpl.java


示例18: setContentUrlCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
public void setContentUrlCache(SimpleCache<Long, ContentUrlEntity> contentUrlCache)
{
    this.contentUrlCache = new EntityLookupCache<Long, ContentUrlEntity, String>(
            contentUrlCache,
            CACHE_REGION_CONTENT_URL,
            contentUrlCallbackDAO);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:AbstractContentDataDAOImpl.java


示例19: setRootNodesCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache that maintains the Store root node data
 * 
 * @param cache                 the cache
 */
public void setRootNodesCache(SimpleCache<Serializable, Serializable> cache)
{
    this.rootNodesCache = new EntityLookupCache<StoreRef, Node, Serializable>(
            cache,
            CACHE_REGION_ROOT_NODES,
            new RootNodesCacheCallbackDAO());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AbstractNodeDAOImpl.java


示例20: setNodesCache

import org.alfresco.repo.cache.SimpleCache; //导入依赖的package包/类
/**
 * Set the cache that maintains node ID-NodeRef cross referencing data
 * 
 * @param cache                 the cache
 */
public void setNodesCache(SimpleCache<Serializable, Serializable> cache)
{
    this.nodesCache = new EntityLookupCache<Long, Node, NodeRef>(
            cache,
            CACHE_REGION_NODES,
            new NodesCacheCallbackDAO());
    if (cache instanceof TransactionalCache)
    {
        this.nodesTransactionalCache = (TransactionalCache<Serializable, Serializable>) cache;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:AbstractNodeDAOImpl.java



注:本文中的org.alfresco.repo.cache.SimpleCache类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractTable类代码示例发布时间:2022-05-23
下一篇:
Java WorkspaceAgent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap