public abstract class LayerCacheManager extends Object implements org.netbeans.core.startup.base.LayerFactory
org.netbeans.core.startup.base.LayerFactory.Provider
Modifier and Type | Method and Description |
---|---|
List<URL> |
additionalLayers(List<URL> urls)
Provides additiona layers to be configured for the target FileSystem
|
static LayerCacheManager |
create(String cacheLocation)
Creates new cache manager for given cache location.
|
abstract FileSystem |
createEmptyFileSystem()
Create an empty cache filesystem, i.e.
|
abstract FileSystem |
load(FileSystem previous,
ByteBuffer bb)
Load the cache from disk.
|
FileSystem |
loadCache()
Loads the filesystem from cache if cache is available.
|
static LayerCacheManager |
manager(boolean real)
Get a cache manager which does nothing.
|
FileSystem |
store(FileSystem fs,
List<URL> urls) |
abstract void |
store(FileSystem fs,
List<URL> urls,
OutputStream os)
Save a new cache to disk, load it, and return that filesystem.
|
public static LayerCacheManager manager(boolean real)
public static LayerCacheManager create(String cacheLocation)
cacheLocation
- unique file namepublic final FileSystem loadCache() throws IOException
loadCache
in interface org.netbeans.core.startup.base.LayerFactory
IOException
- if an I/O error occurspublic final FileSystem store(FileSystem fs, List<URL> urls) throws IOException
store
in interface org.netbeans.core.startup.base.LayerFactory
IOException
public List<URL> additionalLayers(List<URL> urls)
additionalLayers
in interface org.netbeans.core.startup.base.LayerFactory
urls
- initial set of URLspublic abstract FileSystem createEmptyFileSystem() throws IOException
createEmptyFileSystem
in interface org.netbeans.core.startup.base.LayerFactory
IOException
public abstract FileSystem load(FileSystem previous, ByteBuffer bb) throws IOException
LayerCacheManager.createEmptyFileSystem()
or #createLoadedFileSystem
.
Not called if the manager does not support loading;
otherwise must be overridden.IOException
public abstract void store(FileSystem fs, List<URL> urls, OutputStream os) throws IOException
urls
- list of type URL; earlier layers can override later layersIOException