Class PropertiesfileCache
java.lang.Object
org.apache.tools.ant.types.selectors.modifiedselector.PropertiesfileCache
- All Implemented Interfaces:
Cache
Use java.util.Properties for storing the values.
The use of this Cache-implementation requires the use of the parameter
<param name="cache.cachefile" .../> for defining, where to store the
properties file.
The ModifiedSelector sets the cachefile to the default value
cache.properties.
Supported <param>s are:
name | values | description | required |
---|---|---|---|
cache.cachefile | path to file | the name of the properties file | yes |
- Since:
- Ant 1.6
- Version:
- 2003-09-13
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes the cache and its underlying file.Returns a value for a given key from the cache.Getter.boolean
isValid()
This cache is valid if the cachefile is set.iterator()
Returns an iterator over the keys in the cache.void
load()
Load the cache from underlying properties file.void
Saves a key-value-pair in the cache.void
save()
Saves modification of the cache.void
setCachefile
(File file) Setter.toString()
Override Object.toString().
-
Constructor Details
-
PropertiesfileCache
public PropertiesfileCache()Bean-Constructor. -
PropertiesfileCache
-
-
Method Details
-
setCachefile
-
getCachefile
-
isValid
-
load
-
save
public void save()Saves modification of the cache. Cache is only saved if there is one ore more entries. Because entries can not be deleted by this API, this Cache implementation checks the existence of entries before creating the file for performance optimisation. -
delete
-
get
-
put
-
iterator
-
toString
-