本文整理汇总了Java中org.alfresco.repo.cache.SimpleCache类的典型用法代码示例。如果您正苦于以下问题:Java SimpleCache类的具体用法?Java SimpleCache怎么用?Java SimpleCache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleCache类属于org.alfresco.repo.cache包,在下文中一共展示了SimpleCache类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
示例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());
}
示例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());
}