本文整理汇总了Java中com.google.gerrit.extensions.annotations.PluginData类的典型用法代码示例。如果您正苦于以下问题:Java PluginData类的具体用法?Java PluginData怎么用?Java PluginData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PluginData类属于com.google.gerrit.extensions.annotations包,在下文中一共展示了PluginData类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPluginData
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Provides
@PluginData
Path getPluginData() {
if (!ready) {
synchronized (dataDir) {
if (!ready) {
try {
Files.createDirectories(dataDir);
} catch (IOException e) {
throw new ProvisionException(
String.format(
"Cannot create %s for plugin %s", dataDir.toAbsolutePath(), plugin.getName()),
e);
}
ready = true;
}
}
}
return dataDir;
}
示例2: Manager
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Inject
public Manager(
@PluginName final String pluginName,
@PluginData final File pluginData,
final DefaultEventWorker defaultEventWorker,
final EventWorkerFactory eventWorkerFactory,
final PublisherFactory publisherFactory,
final PropertiesFactory propFactory,
final Set<Solver> solvers) {
this.pluginName = pluginName;
this.pluginDataDir = pluginData.toPath();
this.defaultEventWorker = defaultEventWorker;
this.userEventWorker = eventWorkerFactory.create();
this.publisherFactory = publisherFactory;
this.propFactory = propFactory;
this.solvers = solvers;
}
示例3: CoverageDb
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Inject
public CoverageDb(@PluginData File dataDir) {
db = DBMaker.newFileDB(new File(dataDir, "coverage.db"))
.closeOnJvmShutdown()
.make();
hits = db.createHashMap("hits").makeOrGet();
conditions = db.createHashMap("conditions").makeOrGet();
coveredConditions = db.createHashMap("coveredConditions").makeOrGet();
}
示例4: V1
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Inject
public V1(
@PluginName final String pluginName,
@PluginData final File pluginData,
final SitePaths sites
) {
this.pluginName = pluginName;
this.pluginDataDir = pluginData.toPath();
this.etcDir = sites.etc_dir.toPath();
}
示例5: GitBlitSettings
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Inject
public GitBlitSettings(@GerritServerConfig Config config,
@SshListenAddresses List<SocketAddress> sshListenAddresses, @SshAdvertisedAddresses List<String> sshAdvertizedAddresses,
SitePaths sitePaths, @PluginData File homeDir) throws IOException {
super(GitBlitSettings.class);
// Give GitBlit its own baseDir, otherwise it'll create subfolders in the git repo directory.
// Note that if you enable Lucene indexing for GitBlit, it will anyway create a subdirectory
// in that directory called "lucene". See com.gitblit.service.LuceneService. But at least we
// can keep GitBlit's plugins and tickets directories out of the way.
this.homeDir = homeDir;
load(properties, sitePaths.etc_dir.toFile(), new GitBlitUrlsConfig(config, sshListenAddresses, sshAdvertizedAddresses),
sitePaths.resolve(config.getString("gerrit", null, "basePath")).toFile());
}
示例6: getPluginDataAsFile
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Provides
@PluginData
File getPluginDataAsFile(@PluginData Path pluginData) {
return pluginData.toFile();
}
示例7: ReplicationStatusFlatFile
import com.google.gerrit.extensions.annotations.PluginData; //导入依赖的package包/类
@Inject
public ReplicationStatusFlatFile(@PluginData Path pluginData, Provider<Gson> gsonProvider) {
this.pluginData = pluginData;
this.gson = gsonProvider.get();
}