public interface ICacheManager
ICache
objectModifier and Type | Interface and Description |
---|---|
static interface |
ICacheManager.CreateCompletionCallback |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache
|
void |
createCacheFileAsync(String fileNamePrefix,
InputStream content,
ICacheManager.CreateCompletionCallback callback)
Utility method to create a cache file on an asynchronous thread.
|
void |
createCacheFileAsync(String fileNamePrefix,
Reader content,
ICacheManager.CreateCompletionCallback callback)
Utility method to create a cache file on an asynchronous thread.
|
void |
createNamedCacheFileAsync(String fileName,
InputStream content,
ICacheManager.CreateCompletionCallback callback)
Utility method to create a cache file on an asynchronous thread.
|
void |
createNamedCacheFileAsync(String filename,
Reader content,
ICacheManager.CreateCompletionCallback callback)
Utility method to create a cache file on an asynchronous thread.
|
void |
deleteFileDelayed(String filename)
Utility method to asynchronously delete cache files after a delay
period specified by
IOptions.getDeleteDelay() . |
void |
dumpCache(Writer writer,
Pattern filter)
Outputs the string representation of the cache to the specified
writer, filtered using the specified regular expression pattern
|
void |
externalizeCacheObjectAsync(String filename,
Object object,
ICacheManager.CreateCompletionCallback callback)
Utility method to externalize an object on an asynchronous thread.
|
ICache |
getCache()
Returns the current cache object
|
File |
getCacheDir()
Returns the
File object for the cache directory. |
void |
serializeCache()
Synchronously serializes the cache object to dish.
|
void clearCache()
void dumpCache(Writer writer, Pattern filter) throws IOException
writer
- The writer object to output tofilter
- The regular expression filter, or nullIOException
ICache getCache()
void createNamedCacheFileAsync(String fileName, InputStream content, ICacheManager.CreateCompletionCallback callback)
fileName
- The filename of the cache file. The cache file with the
specified name will be created in the cache directory. The
filename may not include a path componentcontent
- The InputStream
to read the file contents fromcallback
- The completion callbackvoid createCacheFileAsync(String fileNamePrefix, InputStream content, ICacheManager.CreateCompletionCallback callback)
fileNamePrefix
- The prefix to use for the generated file namecontent
- The InputStream
to read the file contents fromcallback
- The completion callbackvoid createNamedCacheFileAsync(String filename, Reader content, ICacheManager.CreateCompletionCallback callback)
filename
- The filename of the cache file. The cache file with the
specified name will be created in the cache directory. The
filename may not include a path componentcontent
- The Reader
to read the file contents fromcallback
- The completion callbackvoid createCacheFileAsync(String fileNamePrefix, Reader content, ICacheManager.CreateCompletionCallback callback)
fileNamePrefix
- The prefix to use for the generated file namecontent
- The Reader
to read the file contents fromcallback
- The completion callbackvoid externalizeCacheObjectAsync(String filename, Object object, ICacheManager.CreateCompletionCallback callback)
filename
- The prefix to use for the generated file nameobject
- The object to externalizecallback
- The completion callbackvoid deleteFileDelayed(String filename)
IOptions.getDeleteDelay()
. The idea is
to delay deleting the cache file long enough so that any threads
which may be using the file at the time this method is called have
finished with it and no longer need it. Note that the file may be
deleted before the delay time has expired if the aggregator is
shutdown before the delay time has expiredfilename
- The name of the cache file to delete.File getCacheDir()
File
object for the cache directory.void serializeCache()
Copyright © 2011-2015 IBM. All Rights Reserved.