public final class KSCacheUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
KSCacheUtils.BulkCacheElementLoader<T extends HasPrimaryKey>
A mechanism to load multiple elements from its data source (non-cached) to be used within the helper to acquire those that
are not presently in the cache.
|
static interface |
KSCacheUtils.CacheElementCopier<T> |
static interface |
KSCacheUtils.SingleCacheElementLoader<T extends HasPrimaryKey>
A mechanism to load a single element using its key when it is not available in the cache.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends HasPrimaryKey> |
cacheAwareBulkLoad(net.sf.ehcache.Cache cache,
List<String> elementKeys,
KSCacheUtils.CacheElementCopier<T> copier,
KSCacheUtils.BulkCacheElementLoader<T> loader)
A helper to be used in bulk load scenarios within caching decorator's.
|
static <T extends HasPrimaryKey> |
cacheAwareLoad(net.sf.ehcache.Cache cache,
String key,
KSCacheUtils.CacheElementCopier<T> copier,
KSCacheUtils.SingleCacheElementLoader<T> loader)
A helper to be used in single element load scenarios.
|
static <T extends HasPrimaryKey> |
cacheAwareLoad(net.sf.ehcache.Cache cache,
String key,
org.apache.commons.collections.keyvalue.MultiKey multiKey,
KSCacheUtils.CacheElementCopier<T> copier,
KSCacheUtils.SingleCacheElementLoader<T> loader)
Helper that load using the multikey if it is not null.
|
static <T extends HasPrimaryKey> |
updateCacheElement(net.sf.ehcache.Cache cache,
String cacheKey,
T cacheElement,
KSCacheUtils.CacheElementCopier<T> cacheElementCopier) |
public static <T extends HasPrimaryKey> T cacheAwareLoad(net.sf.ehcache.Cache cache, String key, KSCacheUtils.CacheElementCopier<T> copier, KSCacheUtils.SingleCacheElementLoader<T> loader) throws DoesNotExistException, OperationFailedException, InvalidParameterException, MissingParameterException, PermissionDeniedException
cache - key - loader - PermissionDeniedExceptionMissingParameterExceptionInvalidParameterExceptionOperationFailedExceptionDoesNotExistExceptionpublic static <T extends HasPrimaryKey> T cacheAwareLoad(net.sf.ehcache.Cache cache, String key, org.apache.commons.collections.keyvalue.MultiKey multiKey, KSCacheUtils.CacheElementCopier<T> copier, KSCacheUtils.SingleCacheElementLoader<T> loader) throws DoesNotExistException, OperationFailedException, InvalidParameterException, MissingParameterException, PermissionDeniedException
cache - key - multiKey - loader - DoesNotExistExceptionOperationFailedExceptionInvalidParameterExceptionMissingParameterExceptionPermissionDeniedExceptionpublic static <T extends HasPrimaryKey> List<T> cacheAwareBulkLoad(net.sf.ehcache.Cache cache, List<String> elementKeys, KSCacheUtils.CacheElementCopier<T> copier, KSCacheUtils.BulkCacheElementLoader<T> loader) throws OperationFailedException, InvalidParameterException, MissingParameterException, PermissionDeniedException
cache - elementIds - loader - OperationFailedExceptionPermissionDeniedExceptionMissingParameterExceptionInvalidParameterExceptionpublic static <T extends HasPrimaryKey> void updateCacheElement(net.sf.ehcache.Cache cache, String cacheKey, T cacheElement, KSCacheUtils.CacheElementCopier<T> cacheElementCopier)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.