congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
LazyJDBCSource
Code IndexAdd Tabnine to your IDE (free)

How to use
LazyJDBCSource
in
io.cattle.platform.archaius.sources

Best Java code snippets using io.cattle.platform.archaius.sources.LazyJDBCSource (Showing top 3 results out of 315)

origin: rancher/cattle

@Override
public PollResult poll(boolean initial, Object checkPoint) throws Exception {
  if (source == null) {
    return PollResult.createFull(new HashMap<String, Object>());
  }
  try {
    return source.poll(initial, checkPoint);
  } catch (SQLException e) {
    if (firstLoad) {
      return checkInitial(initial, checkPoint);
    }
    throw e;
  } finally {
    firstLoad = false;
  }
}
origin: rancher/cattle

protected void refresh(AbstractConfiguration config) {
  if (config instanceof DynamicConfiguration && ((DynamicConfiguration) config).getSource() instanceof LazyJDBCSource) {
    LazyJDBCSource source = (LazyJDBCSource) ((DynamicConfiguration) config).getSource();
    if (configDataSource == null) {
      configDataSource = dataSourceFactory.createDataSource(dataSourceName);
    }
    source.setSource(new JDBCConfigurationSource(configDataSource, query, keyColumnName, valueColumnName));
  }
}
origin: rancher/cattle

@Bean
ArchaiusStartup ArchaiusStartup(ExtensionManagerImpl em, @Qualifier("GlobalProperties") Properties props,
    DataSourceFactory dsf, RefreshableFixedDelayPollingScheduler scheduler) {
  ArchaiusStartup.setGlobalDefaults(props);
  ArchaiusStartup startup = new ArchaiusStartup();
  startup.setExtensionManager(em);
  startup.setDataSourceFactory(dsf);
  startup.setSchedulers(Arrays.asList(scheduler));
  EMUtils.addConfig(em, new DefaultTransformedEnvironmentProperties(), "DefaultEnvironmentConfig");
  EMUtils.addConfig(em, new TransformedEnvironmentProperties(), "EnvironmentConfig");
  EMUtils.addConfig(em, new NamedSystemConfiguration(), "SystemConfig");
  AbstractConfiguration localFileConfig = OptionalPropertiesConfigurationFactory.getConfiguration("cattle-local.properties");
  EMUtils.addConfig(em, localFileConfig, "CattleLocalFileConfig");
  NamedDynamicConfiguration dbConfig = new NamedDynamicConfiguration(new LazyJDBCSource(), scheduler);
  dbConfig.setSourceName("Database");
  EMUtils.addConfig(em, dbConfig, "DatabaseConfig");
  AbstractConfiguration cattleFileConfig = OptionalPropertiesConfigurationFactory.getConfiguration("cattle.properties");
  EMUtils.addConfig(em, cattleFileConfig, "CattleFileConfig");
  AbstractConfiguration cattleOverrideFileConfig = OptionalPropertiesConfigurationFactory.getConfiguration("cattle-override.properties");
  EMUtils.addConfig(em, cattleOverrideFileConfig, "CattleOverrideFileConfig");
  AbstractConfiguration cattleGlobalFileConfig = OptionalPropertiesConfigurationFactory.getConfiguration("cattle-global.properties");
  EMUtils.addConfig(em, cattleGlobalFileConfig, "CattleGlobalFileConfig");
  NamedMapConfiguration defaultsConfig = new NamedMapConfiguration(props);
  defaultsConfig.setSourceName("Code Packaged Defaults");
  EMUtils.addConfig(em, defaultsConfig, "DefaultsConfig");
  startup.init();
  em.start();
  startup.start();
  return startup;
}
io.cattle.platform.archaius.sourcesLazyJDBCSource

Most used methods

  • <init>
  • checkInitial
  • setSource

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Socket (java.net)
    Provides a client-side TCP socket.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now