Tabnine Logo
ConfigModelRepo
Code IndexAdd Tabnine to your IDE (free)

How to use
ConfigModelRepo
in
com.yahoo.config.model

Best Java code snippets using com.yahoo.config.model.ConfigModelRepo (Showing top 14 results out of 315)

origin: com.yahoo.vespa/config-model

@Override
public ConfigModelRepo configModelRepo() {
  return new ConfigModelRepo();
}
origin: com.yahoo.vespa/config-model

private void buildModels(ModelNode node,
             ApplicationType applicationType,
             DeployState deployState,
             VespaModel vespaModel,
             AbstractConfigProducer parent,
             List<Element> elements) {
  for (Element servicesElement : elements) {
    ConfigModel model = buildModel(node, applicationType, deployState, vespaModel, parent, servicesElement);
    if (model.isServing())
      add(model);
  }
}
origin: com.yahoo.vespa/config-model

public static List<Content> getContent(ConfigModelRepo pc) {
  List<Content> contents = new ArrayList<>();
  for (ConfigModel model : pc.asMap().values())
    if (model instanceof Content)
      contents.add((Content)model);
  return contents;
}
origin: com.yahoo.vespa/config-model

ModelGraphBuilder graphBuilder = new ModelGraphBuilder();
final List<Element> children = getServiceElements(servicesRoot);
  children.add(getImplicitAdmin(deployState));
children.addAll(getPermanentServices(deployState));
  buildModels(node, getApplicationType(servicesRoot), deployState, vespaModel, root, model2Element.get(node.builder));
for (ConfigModel model : configModels)
  model.initialize(ConfigModelRepo.this); // XXX deprecated
origin: com.yahoo.vespa/config-model

public void setupRouting(DeployState deployState, VespaModel vespaModel, ConfigModelRepo configModels) {
  if (admin != null) {
    Routing routing = configModels.getRouting();
    if (routing == null) {
      routing = new Routing(ConfigModelContext.create(deployState, vespaModel, configModels, this, "routing"));
      configModels.add(routing);
    }
    this.routing = routing;
  }
}
origin: com.yahoo.vespa/config-model

public Clients getClients() {
  return configModelRepo.getClients();
}
origin: com.yahoo.vespa/config-model

private void verifyClusterControllersOnlyDefinedForContent(ConfigModelRepo configModelRepo) {
  Admin admin = getAdmin();
  if (admin == null || admin.getClusterControllers() == null) return;
  if (configModelRepo.getContent() == null) {
    throw new IllegalArgumentException("Declaring <clustercontrollers> in <admin> in services.xml will not work when <content> is not defined");
  }
}
origin: com.yahoo.vespa/config-model

private ConfigModel buildModel(ModelNode node,
                ApplicationType applicationType,
                DeployState deployState,
                VespaModel vespaModel,
                AbstractConfigProducer parent,
                Element servicesElement) {
  ConfigModelBuilder builder = node.builder;
  ConfigModelContext context = ConfigModelContext.create(applicationType, deployState, vespaModel, this, parent, getIdString(servicesElement));
  return builder.build(node, servicesElement, context);
}
origin: com.yahoo.vespa/standalone-container

private ConfigModelRepo resolveConfigModelRepo() {
  try {
    return injector.getInstance(Key.get(ConfigModelRepo.class, CONFIG_MODEL_REPO_NAME));
  } catch (Exception e) {
    return new ConfigModelRepo();
  }
}
origin: com.yahoo.vespa/config-model

@SuppressWarnings("unchecked")
public <T extends ConfigModel> List<T> getModels(Class<T> modelClass) {
  List<T> modelsOfModelClass = new ArrayList<>();
  for (ConfigModel model : asMap().values()) {
    if (modelClass.isInstance(model))
      modelsOfModelClass.add((T)model);
  }
  return modelsOfModelClass;
}
origin: com.yahoo.vespa/application

/**
 * Factory method to create a JDisc from an application package.
 * This method allows deploying OSGi bundles(contained in the components subdirectory).
 * All the OSGi bundles will share the same class loader.
 *
 *
 *
 * @param path the reference to the application package to use
 * @param networking enabled or disabled
 * @return a new JDisc instance
 */
public static JDisc fromPath(Path path, Networking networking) {
  return new JDisc(path, false, networking, new ConfigModelRepo());
}
origin: com.yahoo.vespa/config-model

private void createTlds(DeployLogger deployLogger, ConfigModelRepo pc) {
   for (ConfigModel p : pc.asMap().values()) {
    if (p instanceof Content) {
      ((Content)p).createTlds(deployLogger, pc);
    }
  }
}
origin: com.yahoo.vespa/application

/**
 * Factory method to create a JDisc from an XML String. Note that any components that are referenced in
 * the XML must be present on the classpath. To deploy OSGi bundles in memory,
 * use {@link #fromPath(java.nio.file.Path, com.yahoo.application.Networking)}.
 *
 * @param xml the XML configuration to use
 * @return a new JDisc instance
 */
public static JDisc fromServicesXml(String xml, Networking networking) {
  Path applicationDir = StandaloneContainerRunner.createApplicationPackage(xml);
  return new JDisc(applicationDir, true, networking, new ConfigModelRepo());
}
origin: com.yahoo.vespa/config-model

public void createTlds(DeployLogger deployLogger, ConfigModelRepo modelRepo) {
  IndexedSearchCluster indexedCluster = cluster.getSearch().getIndexed();
  if (indexedCluster == null) return;
  SimpleConfigProducer tldParent = new SimpleConfigProducer(indexedCluster, "tlds");
  for (ConfigModel model : modelRepo.asMap().values()) {
    if ( ! (model instanceof ContainerModel)) continue;
    ContainerCluster containerCluster = ((ContainerModel) model).getCluster();
    if (containerCluster.getSearch() == null) continue; // this is not a qrs cluster
    log.log(LogLevel.DEBUG, "Adding tlds for indexed cluster " + indexedCluster.getClusterName() + ", container cluster " + containerCluster.getName());
    indexedCluster.addTldsWithSameIdsAsContainers(deployLogger, tldParent, containerCluster);
  }
  indexedCluster.setupDispatchGroups(deployLogger);
}
com.yahoo.config.modelConfigModelRepo

Javadoc

A collection of config model instances owned by a system model

Most used methods

  • <init>
  • add
    Adds a new config model instance in this
  • asMap
    Returns a read-only view of the config model instances of this
  • buildModel
  • buildModels
  • getApplicationType
  • getClients
  • getContent
  • getIdString
  • getImplicitAdmin
  • getImplicitAdminV2
  • getImplicitAdminV4
  • getImplicitAdminV2,
  • getImplicitAdminV4,
  • getModels,
  • getPermanentServices,
  • getRouting,
  • getServiceElements,
  • getServicesFromApp,
  • getServicesFromReader,
  • prepareConfigModels,
  • readConfigModels

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JLabel (javax.swing)
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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