|
org.netbeans.libs.git/1 0.8.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.libs.git.GitClientFactory
public final class GitClientFactory
Factory class used to create git clients bound to a specific local repository.
Clients are bound to a local repository. If the repository does not exist yet, you
still have to provide a local file which indicates where the repository would be created when
GitClient.init(org.netbeans.libs.git.progress.ProgressMonitor) was called.
Internally the factory keeps a pool of git repositories and caches data needed to operate
with the repository and to return a client as fast as possible. The repository data are cached under
a weak reference to the instance of the local file passed in the getClient(java.io.File) method.
It means that subsequent call to the getClient method with the same instance of the file
will not have to load all data needed to reconstruct the repository in memory. It is up to a caller's
responsibility to hold a strong reference to the file.
| Method Summary | |
|---|---|
GitClient |
getClient(File repositoryLocation)
Returns a git client bound to a given local git repository. |
static GitClientFactory |
getInstance()
Returns the instance of GitClientFactory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static GitClientFactory getInstance()
GitClientFactory.
GitClientFactory
public GitClient getClient(File repositoryLocation)
throws GitException
repositoryLocation - repository root location, the file may or may not exist.
GitException - when an error occurs while loading repository data from disk.
|
org.netbeans.libs.git/1 0.8.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||