org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardExecutor.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardExecutor.<init>()方法的一些代码示例,展示了WhiteboardExecutor.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WhiteboardExecutor.<init>()方法的具体详情如下:
包路径:org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardExecutor
类名称:WhiteboardExecutor
方法名:<init>

WhiteboardExecutor.<init>介绍

暂无

代码示例

代码示例来源:origin: org.apache.jackrabbit/oak-solr-core

@Activate
protected void activate(ComponentContext componentContext) throws Exception {
  boolean enabled = PropertiesUtil.toBoolean(componentContext.getProperties().get(ENABLED), false);
  if (enabled) {
    BundleContext bundleContext = componentContext.getBundleContext();
    Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
    executor = new WhiteboardExecutor();
    executor.start(whiteboard);
    backgroundObserver = new BackgroundObserver(nodeStateSolrServersObserver, executor, 5);
    regs.add(bundleContext.registerService(Observer.class.getName(), backgroundObserver, null));
  }
}

代码示例来源:origin: apache/jackrabbit-oak

@Activate
protected void activate(ComponentContext componentContext) throws Exception {
  boolean enabled = PropertiesUtil.toBoolean(componentContext.getProperties().get(ENABLED), false);
  if (enabled) {
    BundleContext bundleContext = componentContext.getBundleContext();
    Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
    executor = new WhiteboardExecutor();
    executor.start(whiteboard);
    backgroundObserver = new BackgroundObserver(nodeStateSolrServersObserver, executor, 5);
    regs.add(bundleContext.registerService(Observer.class.getName(), backgroundObserver, null));
  }
}

代码示例来源:origin: org.apache.jackrabbit/oak-core

executor = new WhiteboardExecutor();
executor.start(whiteboard);

代码示例来源:origin: org.apache.jackrabbit/oak-store-document

@Activate
protected void activate(ComponentContext context, Configuration config) throws Exception {
  closer = Closer.create();
  this.config = DocumentNodeStoreServiceConfiguration.create(context,
      configurationAdmin, preset.configuration, config);
  this.context = context;
  whiteboard = new OsgiWhiteboard(context.getBundleContext());
  executor = new WhiteboardExecutor();
  executor.start(whiteboard);
  customBlobStore = this.config.customBlobStore();
  documentStoreType = DocumentStoreType.fromString(this.config.documentStoreType());
  registerNodeStoreIfPossible();
}

代码示例来源:origin: apache/jackrabbit-oak

executor = new WhiteboardExecutor();
executor.start(whiteboard);

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

executor = new WhiteboardExecutor();
executor.start(whiteboard);

代码示例来源:origin: apache/jackrabbit-oak

@Activate
protected void activate(ComponentContext context, Configuration config) throws Exception {
  closer = Closer.create();
  this.config = DocumentNodeStoreServiceConfiguration.create(context,
      configurationAdmin, preset.configuration, config);
  this.context = context;
  whiteboard = new OsgiWhiteboard(context.getBundleContext());
  executor = new WhiteboardExecutor();
  executor.start(whiteboard);
  customBlobStore = this.config.customBlobStore();
  documentStoreType = DocumentStoreType.fromString(this.config.documentStoreType());
  registerNodeStoreIfPossible();
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

@Activate
public void activate(BundleContext bundleContext, Configuration config) {
  List<AsyncConfig> asyncIndexerConfig = getAsyncConfig(config.asyncConfigs());
  Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
  indexRegistration = new IndexMBeanRegistration(whiteboard);
  indexEditorProvider.start(whiteboard);
  executor = new WhiteboardExecutor();
  executor.start(whiteboard);
  long leaseTimeOutMin = config.leaseTimeOutMinutes();
  if (!(nodeStore instanceof Clusterable)){
    leaseTimeOutMin = 0;
    log.info("Detected non clusterable setup. Lease checking would be disabled for async indexing");
  }
  TrackingCorruptIndexHandler corruptIndexHandler = createCorruptIndexHandler(config);
  for (AsyncConfig c : asyncIndexerConfig) {
    AsyncIndexUpdate task = new AsyncIndexUpdate(c.name, nodeStore, indexEditorProvider,
        statisticsProvider, false);
    task.setCorruptIndexHandler(corruptIndexHandler);
    task.setValidatorProviders(Collections.singletonList(validatorProvider));
    task.setLeaseTimeOut(TimeUnit.MINUTES.toMillis(leaseTimeOutMin));
    indexRegistration.registerAsyncIndexer(task, c.timeIntervalInSecs);
    closer.register(task);
  }
  registerAsyncReindexSupport(whiteboard);
  log.info("Configured async indexers {} ", asyncIndexerConfig);
  log.info("Lease time: {} mins and AsyncIndexUpdate configured with {}", leaseTimeOutMin, validatorProvider.getClass().getName());
}

代码示例来源:origin: apache/jackrabbit-oak

@Activate
public void activate(BundleContext bundleContext, Configuration config) {
  List<AsyncConfig> asyncIndexerConfig = getAsyncConfig(config.asyncConfigs());
  Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
  indexRegistration = new IndexMBeanRegistration(whiteboard);
  indexEditorProvider.start(whiteboard);
  executor = new WhiteboardExecutor();
  executor.start(whiteboard);
  long leaseTimeOutMin = config.leaseTimeOutMinutes();
  if (!(nodeStore instanceof Clusterable)){
    leaseTimeOutMin = 0;
    log.info("Detected non clusterable setup. Lease checking would be disabled for async indexing");
  }
  TrackingCorruptIndexHandler corruptIndexHandler = createCorruptIndexHandler(config);
  for (AsyncConfig c : asyncIndexerConfig) {
    AsyncIndexUpdate task = new AsyncIndexUpdate(c.name, nodeStore, indexEditorProvider,
        statisticsProvider, false);
    task.setCorruptIndexHandler(corruptIndexHandler);
    task.setValidatorProviders(Collections.singletonList(validatorProvider));
    task.setLeaseTimeOut(TimeUnit.MINUTES.toMillis(leaseTimeOutMin));
    indexRegistration.registerAsyncIndexer(task, c.timeIntervalInSecs);
    closer.register(task);
  }
  registerAsyncReindexSupport(whiteboard);
  log.info("Configured async indexers {} ", asyncIndexerConfig);
  log.info("Lease time: {} mins and AsyncIndexUpdate configured with {}", leaseTimeOutMin, validatorProvider.getClass().getName());
}

代码示例来源:origin: org.apache.jackrabbit/oak-core

@Activate
public void activate(BundleContext bundleContext, Configuration config) {
  List<AsyncConfig> asyncIndexerConfig = getAsyncConfig(config.asyncConfigs());
  Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
  indexRegistration = new IndexMBeanRegistration(whiteboard);
  indexEditorProvider.start(whiteboard);
  executor = new WhiteboardExecutor();
  executor.start(whiteboard);
  long leaseTimeOutMin = config.leaseTimeOutMinutes();
  if (!(nodeStore instanceof Clusterable)){
    leaseTimeOutMin = 0;
    log.info("Detected non clusterable setup. Lease checking would be disabled for async indexing");
  }
  TrackingCorruptIndexHandler corruptIndexHandler = createCorruptIndexHandler(config);
  for (AsyncConfig c : asyncIndexerConfig) {
    AsyncIndexUpdate task = new AsyncIndexUpdate(c.name, nodeStore, indexEditorProvider,
        statisticsProvider, false);
    task.setCorruptIndexHandler(corruptIndexHandler);
    task.setValidatorProviders(Collections.singletonList(validatorProvider));
    task.setLeaseTimeOut(TimeUnit.MINUTES.toMillis(leaseTimeOutMin));
    indexRegistration.registerAsyncIndexer(task, c.timeIntervalInSecs);
    closer.register(task);
  }
  registerAsyncReindexSupport(whiteboard);
  log.info("Configured async indexers {} ", asyncIndexerConfig);
  log.info("Lease time: {} mins and AsyncIndexUpdate configured with {}", leaseTimeOutMin, validatorProvider.getClass().getName());
}

代码示例来源:origin: apache/jackrabbit-oak

final WhiteboardExecutor executor = new WhiteboardExecutor();
executor.start(whiteboard);
final FilteringObserver filteringObserver = createObserver(executor);

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

final WhiteboardExecutor executor = new WhiteboardExecutor();
executor.start(whiteboard);
final FilteringObserver filteringObserver = createObserver(executor);

代码示例来源:origin: org.apache.jackrabbit/oak-jcr

final WhiteboardExecutor executor = new WhiteboardExecutor();
executor.start(whiteboard);
final FilteringObserver filteringObserver = createObserver(executor);

代码示例来源:origin: apache/jackrabbit-oak

WhiteboardExecutor executor = new WhiteboardExecutor();
executor.start(cfg.getWhiteboard());
registerCloseable(executor);

相关文章