• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SchemaFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.gwtorm.server.SchemaFactory的典型用法代码示例。如果您正苦于以下问题:Java SchemaFactory类的具体用法?Java SchemaFactory怎么用?Java SchemaFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SchemaFactory类属于com.google.gwtorm.server包,在下文中一共展示了SchemaFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: CreateBatchUser

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
public CreateBatchUser(@PluginName String pluginName, SchemaFactory<ReviewDb> schema,
					   PluginConfigFactory configFactory, SshKeyCache sshKeyCache, VersionedAuthorizedKeys.Accessor authorizedKeys,
					   AccountCache accountCache, AccountByEmailCache byEmailCache, AccountLoader.Factory infoLoader,
					   GroupsCollection groupsCollection, WorkQueue queue, ThreadLocalRequestContext context,
					   IdentifiedUser.GenericFactory userFactory) {
	this.schema = schema;
	this.sshKeyCache = sshKeyCache;
	this.authorizedKeys = authorizedKeys;
	this.accountCache = accountCache;
	this.byEmailCache = byEmailCache;
	this.infoLoader = infoLoader;
	this.groupsCollection = groupsCollection;
	this.context = context;
	this.userFactory = userFactory;
	pluginConfig = configFactory.getFromGerritConfig(pluginName);
	username = pluginConfig.getString("username", "jenkins");
	sshKey = pluginConfig.getString("sshKey");
	name = pluginConfig.getString("name", "Batch user");
	executor = queue.getDefaultQueue();

	createBatchUserIfNotExistsYet();
}
 
开发者ID:atteo,项目名称:jfactory,代码行数:24,代码来源:CreateBatchUser.java


示例2: AccountCreator

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
AccountCreator(
    SchemaFactory<ReviewDb> schema,
    Sequences sequences,
    AccountsUpdate.Server accountsUpdate,
    VersionedAuthorizedKeys.Accessor authorizedKeys,
    GroupCache groupCache,
    @ServerInitiated Provider<GroupsUpdate> groupsUpdateProvider,
    SshKeyCache sshKeyCache,
    ExternalIdsUpdate.Server externalIdsUpdate,
    @SshEnabled boolean sshEnabled) {
  accounts = new HashMap<>();
  reviewDbProvider = schema;
  this.sequences = sequences;
  this.accountsUpdate = accountsUpdate;
  this.authorizedKeys = authorizedKeys;
  this.groupCache = groupCache;
  this.groupsUpdateProvider = groupsUpdateProvider;
  this.sshKeyCache = sshKeyCache;
  this.externalIdsUpdate = externalIdsUpdate;
  this.sshEnabled = sshEnabled;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:23,代码来源:AccountCreator.java


示例3: Context

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
Context(
    SchemaFactory<ReviewDb> schemaFactory,
    IdentifiedUser.GenericFactory userFactory,
    Account.Id accountId,
    Project.NameKey project) {
  this.schemaFactory = schemaFactory;
  this.userFactory = userFactory;
  this.accountId = accountId;
  this.project = project;
  map = new HashMap<>();
  cleanup = new RequestCleanup();
  map.put(DB_KEY, new RequestScopedReviewDbProvider(schemaFactory, Providers.of(cleanup)));
  map.put(RC_KEY, cleanup);

  IdentifiedUser user = userFactory.create(accountId);
  user.setAccessPath(AccessPath.GIT);
  map.put(USER_KEY, user);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:19,代码来源:InProcessProtocol.java


示例4: CommandFactoryProvider

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
CommandFactoryProvider(
    @CommandName(Commands.ROOT) DispatchCommandProvider d,
    @GerritServerConfig Config cfg,
    WorkQueue workQueue,
    SshLog l,
    SshScope s,
    SchemaFactory<ReviewDb> sf) {
  dispatcher = d;
  log = l;
  sshScope = s;
  schemaFactory = sf;

  int threads = cfg.getInt("sshd", "commandStartThreads", 2);
  startExecutor = workQueue.createQueue(threads, "SshCommandStart");
  destroyExecutor =
      Executors.newSingleThreadExecutor(
          new ThreadFactoryBuilder()
              .setNameFormat("SshCommandDestroy-%s")
              .setDaemon(true)
              .build());
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:23,代码来源:CommandFactoryProvider.java


示例5: BecomeAnyAccountLoginServlet

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
BecomeAnyAccountLoginServlet(
    DynamicItem<WebSession> ws,
    SchemaFactory<ReviewDb> sf,
    Accounts a,
    AccountCache ac,
    AccountManager am,
    SiteHeaderFooter shf,
    Provider<InternalAccountQuery> qp) {
  webSession = ws;
  schema = sf;
  accounts = a;
  accountCache = ac;
  accountManager = am;
  headers = shf;
  queryProvider = qp;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:18,代码来源:BecomeAnyAccountLoginServlet.java


示例6: EmailMerge

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
EmailMerge(
    @SendEmailExecutor ExecutorService executor,
    MergedSender.Factory mergedSenderFactory,
    SchemaFactory<ReviewDb> schemaFactory,
    ThreadLocalRequestContext requestContext,
    IdentifiedUser.GenericFactory identifiedUserFactory,
    @Assisted Project.NameKey project,
    @Assisted Change.Id changeId,
    @Assisted @Nullable Account.Id submitter,
    @Assisted NotifyHandling notifyHandling,
    @Assisted ListMultimap<RecipientType, Account.Id> accountsToNotify) {
  this.sendEmailsExecutor = executor;
  this.mergedSenderFactory = mergedSenderFactory;
  this.schemaFactory = schemaFactory;
  this.requestContext = requestContext;
  this.identifiedUserFactory = identifiedUserFactory;
  this.project = project;
  this.changeId = changeId;
  this.submitter = submitter;
  this.notifyHandling = notifyHandling;
  this.accountsToNotify = accountsToNotify;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:24,代码来源:EmailMerge.java


示例7: ChangeIndexer

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@AssistedInject
ChangeIndexer(
    @GerritServerConfig Config cfg,
    SchemaFactory<ReviewDb> schemaFactory,
    NotesMigration notesMigration,
    ChangeNotes.Factory changeNotesFactory,
    ChangeData.Factory changeDataFactory,
    ThreadLocalRequestContext context,
    DynamicSet<ChangeIndexedListener> indexedListeners,
    StalenessChecker stalenessChecker,
    @IndexExecutor(BATCH) ListeningExecutorService batchExecutor,
    @Assisted ListeningExecutorService executor,
    @Assisted ChangeIndex index) {
  this.executor = executor;
  this.schemaFactory = schemaFactory;
  this.notesMigration = notesMigration;
  this.changeNotesFactory = changeNotesFactory;
  this.changeDataFactory = changeDataFactory;
  this.context = context;
  this.indexedListeners = indexedListeners;
  this.stalenessChecker = stalenessChecker;
  this.batchExecutor = batchExecutor;
  this.autoReindexIfStale = autoReindexIfStale(cfg);
  this.index = index;
  this.indexes = null;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:27,代码来源:ChangeIndexer.java


示例8: AllChangesIndexer

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
AllChangesIndexer(
    SchemaFactory<ReviewDb> schemaFactory,
    ChangeData.Factory changeDataFactory,
    GitRepositoryManager repoManager,
    @IndexExecutor(BATCH) ListeningExecutorService executor,
    ChangeIndexer.Factory indexerFactory,
    ChangeNotes.Factory notesFactory,
    ProjectCache projectCache) {
  this.schemaFactory = schemaFactory;
  this.changeDataFactory = changeDataFactory;
  this.repoManager = repoManager;
  this.executor = executor;
  this.indexerFactory = indexerFactory;
  this.notesFactory = notesFactory;
  this.projectCache = projectCache;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:18,代码来源:AllChangesIndexer.java


示例9: EventFactory

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
EventFactory(
    AccountCache accountCache,
    Emails emails,
    @CanonicalWebUrl @Nullable Provider<String> urlProvider,
    PatchListCache patchListCache,
    @GerritPersonIdent PersonIdent myIdent,
    ChangeData.Factory changeDataFactory,
    ApprovalsUtil approvalsUtil,
    ChangeKindCache changeKindCache,
    Provider<InternalChangeQuery> queryProvider,
    SchemaFactory<ReviewDb> schema) {
  this.accountCache = accountCache;
  this.emails = emails;
  this.urlProvider = urlProvider;
  this.patchListCache = patchListCache;
  this.myIdent = myIdent;
  this.changeDataFactory = changeDataFactory;
  this.approvalsUtil = approvalsUtil;
  this.changeKindCache = changeKindCache;
  this.queryProvider = queryProvider;
  this.schema = schema;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:24,代码来源:EventFactory.java


示例10: ChangeUpdatedListener

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
ChangeUpdatedListener(final SmartReviewers.Factory smartReviewersFactory,
    final GitRepositoryManager repoManager, final WorkQueue workQueue,
    final IdentifiedUser.GenericFactory identifiedUserFactory,
    final ThreadLocalRequestContext tl,
    final SchemaFactory<ReviewDb> schemaFactory,
    final PluginConfigFactory cfg,
    final @PluginName String pluginName) {
  this.smartReviewersFactory = smartReviewersFactory;
  this.repoManager = repoManager;
  this.workQueue = workQueue;
  this.identifiedUserFactory = identifiedUserFactory;
  this.tl = tl;
  this.schemaFactory = schemaFactory;
  this.cfg = cfg;
  this.pluginName = pluginName;
}
 
开发者ID:Intersec,项目名称:smart-reviewers,代码行数:18,代码来源:ChangeUpdatedListener.java


示例11: UserEventWorker

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
public UserEventWorker(
    ChangeHooks hooks,
    WorkQueue workQueue,
    AccountResolver accountResolver,
    IdentifiedUser.GenericFactory userFactory,
    ThreadLocalRequestContext threadLocalRequestContext,
    PluginUser pluginUser,
    SchemaFactory<ReviewDb> schemaFactory) {
  this.hooks = hooks;
  this.workQueue = workQueue;
  this.accountResolver = accountResolver;
  this.userFactory = userFactory;
  this.threadLocalRequestContext = threadLocalRequestContext;
  this.pluginUser = pluginUser;
  this.schemaFactory = schemaFactory;
}
 
开发者ID:rinrinne,项目名称:gerrit-rabbitmq-plugin,代码行数:18,代码来源:UserEventWorker.java


示例12: setUp

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  dispatcherMock = createMock(EventDispatcher.class);
  replay(dispatcherMock);
  ReviewDb reviewDbMock = createNiceMock(ReviewDb.class);
  replay(reviewDbMock);
  SchemaFactory<ReviewDb> schemaMock = createMock(SchemaFactory.class);
  expect(schemaMock.open()).andReturn(reviewDbMock).anyTimes();
  replay(schemaMock);
  gitUpdateProcessing = new GitUpdateProcessing(dispatcherMock);
}
 
开发者ID:GerritCodeReview,项目名称:plugins_replication,代码行数:12,代码来源:GitUpdateProcessingTest.java


示例13: CiQueryShell

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
CiQueryShell(SchemaFactory<CiDb> dbFactory,
    @Assisted InputStream in,
    @Assisted OutputStream out) {
  this.dbFactory = dbFactory;
  this.in = new BufferedReader(new InputStreamReader(in, UTF_8));
  this.out = new PrintWriter(new OutputStreamWriter(out, UTF_8));
}
 
开发者ID:davido,项目名称:gerrit-ci-plugin,代码行数:9,代码来源:CiQueryShell.java


示例14: postRun

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Override
public void postRun() throws Exception {
  Injector i = buildInjector(parent);
  updater = i.getProvider(SchemaVersion.class);
  this.dbFactory = i.getInstance(
      Key.get(
          new TypeLiteral<SchemaFactory<CiDb>>() {}));
  upgradeSchema();
}
 
开发者ID:davido,项目名称:gerrit-ci-plugin,代码行数:10,代码来源:InitPlugin.java


示例15: configure

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Override
protected void configure() {
  bind(new TypeLiteral<SchemaFactory<CiDb>>() {}).to(
      new TypeLiteral<Database<CiDb>>() {}).in(SINGLETON);
  bind(new TypeLiteral<Database<CiDb>>() {}).toProvider(
      CiDbDatabaseProvider.class).in(SINGLETON);
}
 
开发者ID:davido,项目名称:gerrit-ci-plugin,代码行数:8,代码来源:CiDatabaseModule.java


示例16: SiteRun

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
SiteRun(
    ConsoleUI ui,
    SitePaths site,
    InitFlags flags,
    SchemaUpdater schemaUpdater,
    @ReviewDbFactory SchemaFactory<ReviewDb> schema,
    GitRepositoryManager repositoryManager) {
  this.ui = ui;
  this.site = site;
  this.flags = flags;
  this.schemaUpdater = schemaUpdater;
  this.schema = schema;
  this.repositoryManager = repositoryManager;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:16,代码来源:BaseInit.java


示例17: configure

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Override
protected void configure() {
  bind(Config.class).annotatedWith(GerritServerConfig.class).toInstance(cfg);

  // TODO(dborowitz): Use jimfs.
  bind(Path.class).annotatedWith(SitePath.class).toInstance(sitePath);

  bind(GitRepositoryManager.class).to(InMemoryRepositoryManager.class);
  bind(InMemoryRepositoryManager.class).in(SINGLETON);

  bind(MetricMaker.class).to(DisabledMetricMaker.class);
  bind(DataSourceType.class).to(InMemoryH2Type.class);

  install(new NotesMigration.Module());
  TypeLiteral<SchemaFactory<ReviewDb>> schemaFactory =
      new TypeLiteral<SchemaFactory<ReviewDb>>() {};
  bind(schemaFactory).to(NotesMigrationSchemaFactory.class);
  bind(Key.get(schemaFactory, ReviewDbFactory.class)).to(InMemoryDatabase.class);
  bind(InMemoryDatabase.class).in(SINGLETON);
  bind(ChangeBundleReader.class).to(GwtormChangeBundleReader.class);

  listener().to(CreateDatabase.class);

  bind(SitePaths.class);
  bind(TrackingFooters.class).toProvider(TrackingFootersProvider.class).in(SINGLETON);

  install(new SchemaModule());
  bind(SchemaVersion.class).to(SchemaVersion.C);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:30,代码来源:InMemoryTestingDatabaseModule.java


示例18: Context

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
private Context(SchemaFactory<ReviewDb> sf, SshSession s, CurrentUser u, long at) {
  schemaFactory = sf;
  session = s;
  user = u;
  created = started = finished = at;
  map.put(RC_KEY, cleanup);
  map.put(DB_KEY, new RequestScopedReviewDbProvider(schemaFactory, Providers.of(cleanup)));
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:9,代码来源:AcceptanceTestRequestScope.java


示例19: disableDb

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
public Context disableDb() {
  Context old = current.get();
  SchemaFactory<ReviewDb> sf =
      new SchemaFactory<ReviewDb>() {
        @Override
        public ReviewDb open() {
          return new DisabledReviewDb();
        }
      };
  Context ctx = new Context(sf, old.session, old.user, old.created);

  current.set(ctx);
  local.setContext(ctx);
  return old;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:16,代码来源:AcceptanceTestRequestScope.java


示例20: SendMessage

import com.google.gwtorm.server.SchemaFactory; //导入依赖的package包/类
@Inject
SendMessage(
    Provider<MessageFactory> messageFactory, SchemaFactory<ReviewDb> sf, SshScope sshScope) {
  this.messageFactory = messageFactory;
  this.schemaFactory = sf;
  this.sshScope = sshScope;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:NoShell.java



注:本文中的com.google.gwtorm.server.SchemaFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LongArray类代码示例发布时间:2022-05-23
下一篇:
Java Reader类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap