|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.mercurial.Cache
class Cache
Mercurial repository that serves as a cache to hg operations in the Hudson cluster.
This substantially improves the performance by reducing the amount of data that needs to be transferred. One cache will be built on the Hudson master, then per-slave cache is cloned from there.
manages repository caches.| Field Summary | |
|---|---|
private static java.util.Map<java.lang.String,Cache> |
CACHES
|
private java.lang.String |
hash
Hashed value of remote that only contains characters that are safe as a directory name. |
private java.util.concurrent.locks.ReentrantLock |
lock
Mutual exclusion to the access to the cache. |
private java.lang.String |
remote
The remote source repository that this repository is caching. |
| Constructor Summary | |
|---|---|
private |
Cache(java.lang.String remote,
java.lang.String hash)
|
| Method Summary | |
|---|---|
static Cache |
fromURL(java.lang.String remote)
|
(package private) static java.lang.String |
hashSource(java.lang.String source)
Hash a URL into a string that only contains characters that are safe as directory names. |
(package private) FilePath |
repositoryCache(MercurialSCM config,
Node node,
Launcher launcher,
TaskListener listener,
boolean fromPolling)
Returns a local hg repository cache of the remote repository specified in the given MercurialSCM
on the given Node, fully updated to the tip of the current remote repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String remote
private final java.lang.String hash
remote that only contains characters that are safe as a directory name.
private final java.util.concurrent.locks.ReentrantLock lock
private static final java.util.Map<java.lang.String,Cache> CACHES
| Constructor Detail |
|---|
private Cache(java.lang.String remote,
java.lang.String hash)
| Method Detail |
|---|
@NonNull public static Cache fromURL(java.lang.String remote)
@CheckForNull
FilePath repositoryCache(MercurialSCM config,
Node node,
Launcher launcher,
TaskListener listener,
boolean fromPolling)
throws java.io.IOException,
java.lang.InterruptedException
MercurialSCM
on the given Node, fully updated to the tip of the current remote repository.
node - The node that gets a local cached repository.
node to the local repository cache, cloned off from the master cache.
java.io.IOException
java.lang.InterruptedExceptionstatic java.lang.String hashSource(java.lang.String source)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||