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


Java Loader类代码示例

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


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

示例1: runLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
private void runLoaders(String runId, URI pipelineId, Map<String, Object> customData) {
    for (Loader loader : loaders) {
        if (loader instanceof Disableable && ((Disableable) loader).isDisabled()) {
            continue;
        }
        LoadContext context = new LoadContext(runId, customData);
        context.setPipeline(this);
        try {
            long start = System.currentTimeMillis();
            loader.load(repository, pipelineId, context);
            context.setDuration(System.currentTimeMillis() - start);
            eventPublisher.publishEvent(new LoadCompletedEvent(loader, context, this));
        } catch (LoadException ex) {
            eventPublisher.publishEvent(new LoadFailedEvent(ex, loader, context, this));
        }
        if (cancelAllowed && context.isCancelPipeline()) {
            eventPublisher.publishEvent(new PipelineAbortedEvent(context.getCancelMessage(), this, runId, loader));
            return;
        }
    }
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:22,代码来源:ETLPipelineImpl.java

示例2: init

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public void init() {
    TabSheet tabsheet = new TabSheet();
    tabsheet.setWidth("100%");

    selectedExtractors = new BeanItemContainer<Extractor>(Extractor.class, job.getPipeline().getExtractors());
    selectedTransformers = new BeanItemContainer<Transformer>(Transformer.class, job.getPipeline().getTransformers());
    selectedLoaders = new BeanItemContainer<Loader>(Loader.class, job.getPipeline().getLoaders());
    initGenericDialog(Extractor.class, extractorDialog, provider.getAvailableExtractors(), job.getPipeline().getExtractors(), selectedExtractors);
    initGenericDialog(Loader.class, loaderDialog, provider.getAvailableLoaders(), job.getPipeline().getLoaders(), selectedLoaders);
    initGenericDialog(Transformer.class, transformerDialog, provider.getAvailableTransformers(), job.getPipeline().getTransformers(), selectedTransformers);

    initJobDialog(job);
    addComponent(jobDialog);
    tabsheet.addTab(extractorDialog, "Extractors", null, 0);
    tabsheet.addTab(transformerDialog, "Transformers", null, 1);
    tabsheet.addTab(loaderDialog, "Loaders", null, 2);
    tabsheet.setSizeFull();
    addComponent(tabsheet);
    setExpandRatio(tabsheet, 0.75f);
    setSizeFull();
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:22,代码来源:JobWizardBase.java

示例3: testSetAndGetLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
/**
 * Test of getLoaders method, of class ETLPipelineImpl.
 */
@Test
public void testSetAndGetLoaders() {
    List<Loader> loaders = new ArrayList<Loader>();
    loaders.add(new MockLoader());
    ETLPipelineImpl instance = new ETLPipelineImpl();
    instance.setLoaders(loaders);

    assertEquals(loaders, instance.getLoaders());
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:13,代码来源:ETLPipelineImplTest.java

示例4: testRunExecuteLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Test
public void testRunExecuteLoaders() {
    ETLPipelineImpl instance = new ETLPipelineImpl(id, new MockApplicationEventPublisher(), repository);

    instance.setLoaders(getMockLoaders(2));
    instance.run();
    for (Loader loader : instance.getLoaders()) {
        assertTrue(((MockLoader) loader).executed);
    }
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:11,代码来源:ETLPipelineImplTest.java

示例5: testRunLoadCompletedEventFired

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Test
public void testRunLoadCompletedEventFired() {
    MockApplicationEventPublisher eventPublisher = new MockApplicationEventPublisher();
    ETLPipelineImpl instance = new ETLPipelineImpl(id, eventPublisher, repository);

    Loader loader = new MockLoader();
    instance.setLoaders(Arrays.asList(loader));
    instance.run();

    LoadCompletedEvent completedEvent = eventPublisher.getPublishedEventsOfType(LoadCompletedEvent.class).get(0);
    Assert.assertEquals(loader, completedEvent.getLoader());
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:13,代码来源:ETLPipelineImplTest.java

示例6: getMockLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
private List<Loader> getMockLoaders(int i) {
    List<Loader> loaders = new ArrayList<Loader>(i);
    for (int j = 0; j < i; j++) {
        loaders.add(new MockLoader());
    }
    return loaders;
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:8,代码来源:ETLPipelineImplTest.java

示例7: getLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Override
public List<Loader> getLoaders() {
    return loaders;
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:5,代码来源:ETLPipelineImpl.java

示例8: setLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
@Override
public void setLoaders(List<Loader> loaders) {
    this.loaders = loaders;
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:5,代码来源:ETLPipelineImpl.java

示例9: getLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public List<ComponentBlueprint<Loader>> getLoaders() {
  return loaders;
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:4,代码来源:ETLJobBlueprint.java

示例10: setLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public void setLoaders(List<ComponentBlueprint<Loader>> loaders) {
  this.loaders = loaders;
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:4,代码来源:ETLJobBlueprint.java

示例11: getAvailableLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
public List<Loader> getAvailableLoaders() {
    return loaders;
}
 
开发者ID:lodms,项目名称:lodms-core,代码行数:4,代码来源:ServiceListProvider.java

示例12: getLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
/**
 * Returns the list of loaders defined for this pipeline
 *
 * @return
 */
public List<Loader> getLoaders();
 
开发者ID:lodms,项目名称:lodms-core,代码行数:7,代码来源:ETLPipeline.java

示例13: setLoaders

import at.punkt.lodms.spi.load.Loader; //导入依赖的package包/类
/**
 * Sets the list of loaders defined for this pipeline
 *
 * @param loaders
 */
public void setLoaders(List<Loader> loaders);
 
开发者ID:lodms,项目名称:lodms-core,代码行数:7,代码来源:ETLPipeline.java


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