Examples of load()


Examples of javax.cache.CacheLoader.load()

   
    if (mnodeValue == null || mnodeValue.isEntryExpired(now)) {
      CacheLoader loader = config.getCacheLoader();

      if (loader != null && entry.getKey() != null) {
        Object value = loader.load(entry.getKey());

        if (value != null) {
          put(entry, value, config, now, mnodeValue);

          return;
View Full Code Here

Examples of javax.swing.plaf.synth.SynthLookAndFeel.load()

      }
      else
         bis = currentProject.getBufferedInputStream ( synthConfigFile );

      DebugLogger.log( "Synth config file: " + currentProject.findResourceAsString( synthConfigFile ));
      synth.load( bis, resourceLoader );
      UIManager.setLookAndFeel( synth );
    }
    catch ( Exception ex ) {
      ex.printStackTrace();
    }
View Full Code Here

Examples of javax.util.jcache.CacheLoader.load()

        if (objHandle.needsLoading(arguments)) {
            Attributes attribs = objHandle.getAttributes();
            CacheLoader loader = attribs.getLoader();
            Object retrievedObject;
            try {
                retrievedObject = loader.load(objHandle, arguments);
                if (retrievedObject == null) {
                    throw new ObjectNotFoundException("The returned object from the CacheLoader " + loader.getClass().getName() + " was null.");
                }
                if (retrievedObject instanceof CacheOutputStream) {
                    /*
 
View Full Code Here

Examples of jetbrick.template.JetConfig.load()

            // 在 weblogic 中以 war 方式部署的时候,无法使用 getRealPath 方法.
            System.setProperty("webapp.dir", webappdir);
        }

        JetConfig config = new JetConfig();
        config.load(JetConfig.TEMPLATE_LOADER, WebResourceLoader.class.getName());
        config.load(JetConfig.TEMPLATE_PATH, "/"); // 默认 Webapp 根目录

        String location = sc.getInitParameter(CONFIG_LOCATION);
        if (location != null && location.length() > 0) {
            config.loadSerlvetResource(sc, location);
View Full Code Here

Examples of jnode.report.ConnectionStatData.load()

                ConnectionStatData data = new ConnectionStatData(statPath);

                ConnectionStatData.ConnectionStatDataElement current;

                List<ConnectionStatData.ConnectionStatDataElement> elements = data.load();

                int pos = data.findPos(evt.getAddress(), elements);
                if (pos == -1) {
                    current = new ConnectionStatData.ConnectionStatDataElement();
                    current.linkStr = evt.getAddress() != null ? evt.getAddress().toString() : null;
View Full Code Here

Examples of jodd.props.Props.load()

  }

  @Test
  public void testProps() {
    Props props = new Props();
    props.load("pojoBean2.val2=123");
    props.load("pojoBean2.val1=\\\\${pojo}");

    assertEquals("123", props.getValue("pojoBean2.val2"));
    assertEquals("\\${pojo}", props.getValue("pojoBean2.val1"));
View Full Code Here

Examples of jst.TemplateContextImpl.load()

public class EmbedTemplateTest {

    public static void main(String[] args) throws IOException {
        TemplateContextImpl context = new TemplateContextImpl();
        context.addLoader( new FileTemplateLoader( new File("./test") ) );
        ScriptRuntime runtime = context.load("/embedded-test.jst");
        Object output = runtime.addVariable("name", "Charlie").addVariable("age", 31).invoke();

        System.out.println( output );
    }
}
View Full Code Here

Examples of krati.core.StoreConfig.load()

        config.setSegmentFileSizeMB(StoreParams.SEGMENT_FILE_SIZE_MB_MIN);
        config.setNumSyncBatches(StoreParams.BATCH_SIZE_MIN);
        config.setBatchSize(StoreParams.BATCH_SIZE_MIN);
        config.save(propertiesFile, null);
       
        config2.load(propertiesFile);
        assertEquals(MemorySegmentFactory.class, config2.getSegmentFactory().getClass());
        assertEquals(MemorySegmentFactory.class.getName(), config2.getProperty(StoreParams.PARAM_SEGMENT_FACTORY_CLASS));
        assertEquals(Fnv1aHash64.class, config2.getHashFunction().getClass());
        assertEquals(Fnv1aHash64.class.getName(), config2.getProperty(StoreParams.PARAM_HASH_FUNCTION_CLASS));
        assertEquals(StoreParams.SEGMENT_FILE_SIZE_MB_MIN, config2.getSegmentFileSizeMB());
View Full Code Here

Examples of krati.core.StorePartitionConfig.load()

        config.setSegmentFileSizeMB(StoreParams.SEGMENT_FILE_SIZE_MB_MIN);
        config.setNumSyncBatches(StoreParams.BATCH_SIZE_MIN);
        config.setBatchSize(StoreParams.BATCH_SIZE_MIN);
        config.save(propertiesFile, null);
       
        config2.load(propertiesFile);
        assertEquals(MemorySegmentFactory.class, config2.getSegmentFactory().getClass());
        assertEquals(MemorySegmentFactory.class.getName(), config2.getProperty(StoreParams.PARAM_SEGMENT_FACTORY_CLASS));
        assertEquals(Fnv1aHash64.class, config2.getHashFunction().getClass());
        assertEquals(Fnv1aHash64.class.getName(), config2.getProperty(StoreParams.PARAM_HASH_FUNCTION_CLASS));
        assertEquals(StoreParams.SEGMENT_FILE_SIZE_MB_MIN, config2.getSegmentFileSizeMB());
View Full Code Here

Examples of kz.pvnhome.cr3runner.CommandLoader.load()

    super("TestApp");

    setSize(200, 200);

    CommandLoader loader = new CommandLoader("conf/cr3runner", "commands.txt");
    List commands = loader.load();

    Panel btnPanel = new Panel();
    btnPanel.setLayout(new GridLayout(commands.size(), 1));

    for (int i = 0; i < commands.size(); i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.