- Documentation (2.4.0)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildobr
- buildnumber
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- repreport
- resolve
- resources
- retrieve
- report
- settings
- var
- Using standalone
- OSGi
- Developer doc
lock-strategies
Tag: lock-strategies since 2.0 Defines a list of lock strategies usable in Ivy. A lock strategy is used by a cache manager to decide when and how locking should be performed (see settings/cache to see how to configure the lock strategy to use).
The following strategies are registered by default:
- no-lock This lock strategy actually performs no locking at all, and thus should not be used in an environment where the cache is shared by multiple processes.
- artifact-lock This strategy acquires a lock whenever a module descriptor or an artifact is downloaded to the cache, which makes a good solution when you want to share your repository cache.
- artifact-lock-nio (since 2.4) Like the artifact-lock-strategy, this one also acquires a lock whenever a module descriptor or artifact is downloaded to the cache. But here the implementation is done with a java.nio.FileLock.
Note that this strategy is based on file locking, performed by default using the java.io.File.createNewFile() atomicity (which is documented as atomic in the javadoc, but not recommended to perform locks).
Child elements
Element | Description | Cardinality |
---|---|---|
any lock strategy | adds a lock strategy to the list of available ones | 0..n |