public class SimpleDirectoryPersistentCache extends Object implements EntityCapsPersistentCache
| Constructor and Description |
|---|
SimpleDirectoryPersistentCache(File cacheDir)
Creates a new SimpleDirectoryPersistentCache Object.
|
SimpleDirectoryPersistentCache(File cacheDir,
StringEncoder filenameEncoder)
Creates a new SimpleDirectoryPersistentCache Object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDiscoverInfoByNodePersistent(String nodeVer,
DiscoverInfo info)
Add an DiscoverInfo to the persistent Cache
|
void |
emptyCache()
Empty the Cache
|
DiscoverInfo |
lookup(String nodeVer)
Lookup DiscoverInfo by a Node string
|
public SimpleDirectoryPersistentCache(File cacheDir)
Default filename encoder Base32, as this will work on all
file systems, both case sensitive and case insensitive. It does however
produce longer filenames.
cacheDir - public SimpleDirectoryPersistentCache(File cacheDir, StringEncoder filenameEncoder)
Base32 (which is the default).cacheDir - The directory where the cache will be stored.filenameEncoder - Encodes the node string into a filename.public void addDiscoverInfoByNodePersistent(String nodeVer, DiscoverInfo info)
EntityCapsPersistentCacheaddDiscoverInfoByNodePersistent in interface EntityCapsPersistentCachepublic DiscoverInfo lookup(String nodeVer)
EntityCapsPersistentCachelookup in interface EntityCapsPersistentCachepublic void emptyCache()
EntityCapsPersistentCacheemptyCache in interface EntityCapsPersistentCache