本文整理了Java中org.eclipse.jgit.lib.Repository.incrementOpen
方法的一些代码示例,展示了Repository.incrementOpen
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.incrementOpen
方法的具体详情如下:
包路径:org.eclipse.jgit.lib.Repository
类名称:Repository
方法名:incrementOpen
[英]Increment the use counter by one, requiring a matched #close().
[中]将使用计数器增加1,需要匹配的#close()。
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
@Override
protected Repository openRepository() {
repo.incrementOpen();
return repo;
}
};
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
private Repository openRepository(final Key location,
final boolean mustExist) throws IOException {
Repository db = cacheMap.get(location);
if (db == null) {
synchronized (lockFor(location)) {
db = cacheMap.get(location);
if (db == null) {
db = location.open(mustExist);
cacheMap.put(location, db);
} else {
db.incrementOpen();
}
}
} else {
db.incrementOpen();
}
return db;
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
db.incrementOpen();
return db;
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
@Override
protected Repository openRepository() {
repo.incrementOpen();
return repo;
}
};
代码示例来源:origin: berlam/github-bucket
@Override
protected Repository openRepository() {
repo.incrementOpen();
return repo;
}
};
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
try (Git git = clone.call()) {
subRepo = git.getRepository();
subRepo.incrementOpen();
代码示例来源:origin: com.madgag/org.eclipse.jgit.junit.http
public Repository open(HttpServletRequest req, String name)
throws RepositoryNotFoundException,
ServiceNotEnabledException {
if (!name.equals(nameOf(db)))
throw new RepositoryNotFoundException(name);
db.incrementOpen();
return db;
}
});
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit.junit.http
@Override
public Repository open(HttpServletRequest req, String name)
throws RepositoryNotFoundException,
ServiceNotEnabledException {
if (!name.equals(nameOf(db)))
throw new RepositoryNotFoundException(name);
db.incrementOpen();
return db;
}
});
代码示例来源:origin: berlam/github-bucket
private Repository openRepository(final Key location,
final boolean mustExist) throws IOException {
Repository db = cacheMap.get(location);
if (db == null) {
synchronized (lockFor(location)) {
db = cacheMap.get(location);
if (db == null) {
db = location.open(mustExist);
cacheMap.put(location, db);
} else {
db.incrementOpen();
}
}
} else {
db.incrementOpen();
}
return db;
}
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
@SuppressWarnings("resource")
private Repository openRepository(final Key location,
final boolean mustExist) throws IOException {
Reference<Repository> ref = cacheMap.get(location);
Repository db = ref != null ? ref.get() : null;
if (db == null) {
synchronized (lockFor(location)) {
ref = cacheMap.get(location);
db = ref != null ? ref.get() : null;
if (db == null) {
db = location.open(mustExist);
ref = new SoftReference<Repository>(db);
cacheMap.put(location, ref);
} else {
db.incrementOpen();
}
}
} else {
db.incrementOpen();
}
return db;
}
代码示例来源:origin: org.arquillian.smart.testing/git-rules
private GitServlet createGitServlet() {
final GitServlet gitServlet = new GitServlet();
gitServlet.setRepositoryResolver((req, name) -> {
String trimmedName = name.endsWith(SUFFIX) ? name.substring(0, name.length() - SUFFIX.length()) : name;
trimmedName = trimmedName.substring(trimmedName.lastIndexOf('/') + 1);
if (repositories.containsKey(trimmedName)) {
final LazilyLoadedRepository lazilyLoadedRepository = repositories.get(trimmedName);
synchronized (gitServlet) {
lazilyLoadedRepository.cloneRepository();
final Repository repository = lazilyLoadedRepository.get();
enableInsecureReceiving(repository);
repository.incrementOpen();
return repository;
}
} else {
throw new RepositoryNotFoundException("Repository " + name + "does not exist");
}
});
gitServlet.addReceivePackFilter(new AfterReceivePackResetFilter(repositories.values()));
return gitServlet;
}
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
db.incrementOpen();
return db;
代码示例来源:origin: berlam/github-bucket
db.incrementOpen();
return db;
代码示例来源:origin: berlam/github-bucket
try (Git git = clone.call()) {
subRepo = git.getRepository();
subRepo.incrementOpen();
内容来源于网络,如有侵权,请联系作者删除!