当前位置: 首页>>代码示例>>Java>>正文


Java SpiServer类代码示例

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


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

示例1: createMappingJson

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
@Test
public void createMappingJson() throws Exception {

  // we don't need the docstore active to run this test
  System.setProperty("ebean.docstore.active","false");

  EIndexMappingsBuilder mappingsBuilder = new EIndexMappingsBuilder(new JsonFactory());

  SpiServer server = Ebean.getDefaultServer().getPluginApi();
  BeanType<Country> countryType = server.getBeanType(Country.class);

  String mappingJson = mappingsBuilder.createMappingJson(countryType);

  assertEquals(mappingJson, "{\n" +
      "  \"mappings\" : {\n" +
      "    \"country\" : {\n" +
      "      \"properties\" : {\n" +
      "        \"name\": { \"type\": \"text\" }\n" +
      "      }\n" +
      "    }\n" +
      "  }\n" +
      "}");
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:24,代码来源:EIndexMappingsBuilderTest.java

示例2: ElasticUpdateProcessor

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
public ElasticUpdateProcessor(SpiServer server, IndexQueueWriter queueWriter, JsonFactory jsonFactory,
                              Object defaultObjectMapper, IndexMessageSender messageSender, int defaultBatchSize) {

  this.server = server;
  this.queueWriter = queueWriter;
  this.defaultBatchSize = defaultBatchSize;
  this.bulkSender = new BulkSender(jsonFactory, JsonConfig.Include.NON_EMPTY, defaultObjectMapper, messageSender);
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:9,代码来源:ElasticUpdateProcessor.java

示例3: EIndexService

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
public EIndexService(SpiServer server, JsonFactory jsonFactory, IndexMessageSender sender) {
  this.server = server;
  this.jsonFactory = jsonFactory;
  this.sender = sender;
  this.config = server.getServerConfig().getDocStoreConfig();
  this.mappingsBuilder = new EIndexMappingsBuilder(jsonFactory);
  this.generateMapping = config.isGenerateMapping();
  this.dropCreateIndexes = config.isDropCreate();
  this.createIndexes = config.isCreate() || dropCreateIndexes;
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:11,代码来源:EIndexService.java

示例4: EQueryService

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
public EQueryService(SpiServer server, JsonFactory jsonFactory, IndexMessageSender messageSender) {
  this.server = server;
  this.jsonContext = server.json();
  this.send = new EQuerySend(jsonFactory, messageSender);
  this.elasticJsonContext = new ElasticJsonContext(jsonContext);
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:7,代码来源:EQueryService.java

示例5: ElasticDocumentStore

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
ElasticDocumentStore(SpiServer server, ElasticUpdateProcessor updateProcessor, IndexMessageSender sender, JsonFactory jsonFactory) {
  this.server = server;
  this.updateProcessor = updateProcessor;
  this.queryService = new EQueryService(server, jsonFactory, sender);
  this.indexService = new EIndexService(server, jsonFactory, sender);
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:7,代码来源:ElasticDocumentStore.java

示例6: process

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
public static <T> long process(SpiServer server, BeanType<T> desc, UpdateGroup group, BulkUpdate txn) throws IOException {
  return new ProcessGroup<>(server, desc, group, txn).processGroup();
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:4,代码来源:ProcessGroup.java

示例7: ProcessGroup

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
private ProcessGroup(SpiServer server, BeanType<T> desc, UpdateGroup group, BulkUpdate txn) {
  this.server = server;
  this.desc = desc;
  this.group = group;
  this.txn = txn;
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:7,代码来源:ProcessGroup.java

示例8: create

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
@Override
public DocStoreIntegration create(SpiServer server) {

  ServerConfig serverConfig = server.getServerConfig();

  Object objectMapper = serverConfig.getObjectMapper();

  DocStoreConfig docStoreConfig = serverConfig.getDocStoreConfig();

  JsonFactory jsonFactory = new JsonFactory();
  IndexQueueWriter indexQueueWriter = new BaseIndexQueueWriter(server, "eb_elastic_queue");
  IndexMessageSender messageSender = new BaseHttpMessageSender(docStoreConfig);

  ElasticUpdateProcessor updateProcessor = new ElasticUpdateProcessor(server, indexQueueWriter, jsonFactory, objectMapper, messageSender, docStoreConfig.getBulkBatchSize());

  ElasticDocumentStore docStore = new ElasticDocumentStore(server, updateProcessor, messageSender, jsonFactory);

  return new Components(updateProcessor, docStore);
}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:20,代码来源:ElasticDocStoreFactory.java

示例9: getPluginApi

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
@Override
public SpiServer getPluginApi() {
  return null;
}
 
开发者ID:ebean-orm,项目名称:ebean-mocker,代码行数:5,代码来源:TDEbeanServer.java

示例10: getPluginApi

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
@Override
public SpiServer getPluginApi() {
  methodCalls.add(MethodCall.of("getPluginApi"));
  return delegate.getPluginApi();
}
 
开发者ID:ebean-orm,项目名称:ebean-mocker,代码行数:6,代码来源:DelegateEbeanServer.java

示例11: configure

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
@Override
public void configure(SpiServer server) {

}
 
开发者ID:ebean-orm,项目名称:ebean-elastic,代码行数:5,代码来源:ElasticDocStoreFactory.java

示例12: createDdlWriter

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
/**
 * <p>createDdlWriter.</p>
 *
 * @return a {@link ameba.db.ebean.migration.PlatformDdlWriter} object.
 */
protected PlatformDdlWriter createDdlWriter() {
    return new PlatformDdlWriter(scriptInfo, (SpiServer) server);
}
 
开发者ID:icode,项目名称:ameba,代码行数:9,代码来源:ModelMigration.java

示例13: PlatformDdlWriter

import io.ebean.plugin.SpiServer; //导入依赖的package包/类
/**
 * <p>Constructor for PlatformDdlWriter.</p>
 *
 * @param scriptInfo a {@link ameba.db.migration.models.ScriptInfo} object.
 * @param server     a {@link io.ebean.plugin.SpiServer} object.
 */
public PlatformDdlWriter(ScriptInfo scriptInfo, SpiServer server) {
    this.scriptInfo = scriptInfo;
    this.server = server;
    this.platformDdl = PlatformDdlBuilder.create(server.getDatabasePlatform());
}
 
开发者ID:icode,项目名称:ameba,代码行数:12,代码来源:PlatformDdlWriter.java


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