當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。