DefaultBundleArchive
, implements the default file system-based bundle cache for Oscar. It is possible to configure the default behavior of this class by setting system properties or passing properties into Oscar's constructor. The configuration properties for this class are: oscar.cache.bufsize
- Sets the buffer size to be used by the cache; the default value is 4096. The integer value of this string provides control over the size of the internal buffer of the disk cache for performance reasons. oscar.cache.dir
- Sets the directory to be used by the cache as its cache directory. The cache directory is where all profile directories are stored and a profile directory is where a set of installed bundles are stored. By default, the cache directory is .oscar
in the user's home directory. If this property is specified, then its value will be used as the cache directory instead of .oscar
. This directory will be created if it does not exist. oscar.cache.profile
- Sets the profile name that will be used to create a profile directory inside of the cache directory. The created directory will contained all installed bundles associated with the profile. oscar.cache.profiledir
- Sets the directory to use as the profile directory for the bundle cache; by default the profile name is used to create a directory in the .oscar
cache directory. If this property is specified, then the cache directory and profile name properties are ignored. The specified value of this property is used directly as the directory to contain all cached bundles. If this property is set, it is not necessary to set the cache directory or profile name properties. This directory will be created if it does not exist. For specific information on how to configure Oscar using system properties, refer to the Oscar usage documentation.
Definition at line 93 of file OpenmisOscarBundleCache.java.
Public Member Functions | |
OpenmisOscarBundleCache () | |
void | initialize (PropertyResolver cfg, LogService logger) throws Exception |
BundleArchive[] | getArchives () throws Exception |
BundleArchive | getArchive (long id) throws Exception |
BundleArchive | create (long id, String location, InputStream is) throws Exception |
void | update (BundleArchive ba, InputStream is) throws Exception |
void | purge (BundleArchive ba) throws Exception |
void | remove (BundleArchive ba) throws Exception |
Static Public Attributes | |
static final String | CACHE_BUFSIZE_PROP = "oscar.cache.bufsize" |
static final String | CACHE_DIR_PROP = "oscar.cache.dir" |
static final String | CACHE_PROFILE_DIR_PROP = "oscar.cache.profiledir" |
static final String | CACHE_PROFILE_PROP = "oscar.cache.profile" |
Static Protected Attributes | |
static transient int | BUFSIZE = 4096 |
static transient final String | CACHE_DIR_NAME = ".noscar" |
static transient final String | BUNDLE_DIR_PREFIX = "bundle" |