public class SyncCacheUtils
extends java.lang.Object
| 构造器和说明 |
|---|
SyncCacheUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
cache(java.lang.String filePath)
缓存文件
|
static void |
cache(java.lang.String filePath,
boolean notifyReplicator)
缓存文件
|
static void |
doAfterCachePut(ResourceElement element)
缓存持久化到资源仓库
|
static void |
doAfterCacheRemoved(ResourceElement element)
移除缓存后的操作
|
static java.lang.String |
keyToPath(java.lang.String key)
将key转化成实际文件的路径
|
static java.lang.String |
pathToKey(java.lang.String path)
将下层仓库的路径转换为缓存ResourceElementKey的key和MD5 Map的key
|
static void |
refreshCache(ResourceElement element)
重新缓存
|
static void |
refreshCache(java.lang.String filePath)
重新缓存
|
static void |
removeCache(java.lang.String filePath)
移除缓存
|
public static void cache(java.lang.String filePath)
throws ResourceIOException
filePath - 资源文件路径ResourceIOExceptionpublic static void cache(java.lang.String filePath,
boolean notifyReplicator)
throws ResourceIOException
filePath - 资源文件路径notifyReplicator - 是否通知其它节点ResourceIOExceptionpublic static void removeCache(java.lang.String filePath)
filePath - public static void refreshCache(java.lang.String filePath)
throws ResourceIOException
filePath - 资源文件路径ResourceIOExceptionpublic static void refreshCache(ResourceElement element) throws ResourceIOException
element - 缓存ResourceIOExceptionpublic static void doAfterCachePut(ResourceElement element)
element - 缓存public static void doAfterCacheRemoved(ResourceElement element)
element - public static java.lang.String pathToKey(java.lang.String path)
path - 资源仓库的路径public static java.lang.String keyToPath(java.lang.String key)
key - addCache key