/** * Creates a componentId that is unique for this run-time instance */ // TODO: Check if we really need this. -JB public static ComponentId createAnonymousComponentId(String baseName) { return new ComponentId(baseName, null, null, true); }
/** * Creates a service with a name with an unbounded input queue. If the given name is null or the empty string, * it will become the name "default". */ public DocprocService(String name) { this(new ComponentId(name, null)); }
/** Convenience shorthand for new QueryProfile(new ComponentId(idString)) */ public QueryProfile(String idString) { this(new ComponentId(idString)); }
/** Create a chain directly. This will NOT order the chain by the ordering constraints. */ public Chain(String id, List<COMPONENT> componentList) { this(new ComponentId(id), componentList); }
/** Create a chain directly. This will NOT order the chain by the ordering constraints. */ public Chain(List<COMPONENT> componentList) { this(new ComponentId("anonymous chain"), componentList); }
public Resolver(String id) { super(new ComponentId(id)); }
/** Create a chain directly. This will NOT order the chain by the ordering constraints. */ @SafeVarargs public Chain(String id, COMPONENT... components) { this(new ComponentId(id), components); }
static ChainSpecification emptySearchChainSpecification(String componentName) { return new ChainSpecification( new ComponentId(componentName), VespaSearchChainsCreator.inheritsVespaPhases(), //TODO: refactor Collections.<Phase>emptyList(), Collections.<ComponentSpecification>emptySet()); }
public DummySslProvider(String serverName) { super(new ComponentModel( new BundleInstantiationSpecification(new ComponentId(COMPONENT_ID_PREFIX + serverName), fromString(COMPONENT_CLASS), fromString(COMPONENT_BUNDLE)))); }
private static ChainSpecification nativeSearchChainSpecification() { return new ChainSpecification( new ComponentId("native"), inheritsVespaPhases(), noPhases(), noSearcherReferences()); }
private static <T extends ChainedComponent> Chain<T> buildChain(Collection<T> components, Collection<Phase> phases) { ChainBuilder<T> builder = new ChainBuilder<>(new ComponentId("temp")); for (Phase phase : phases) { builder.addPhase(phase); } for (T component : components) { builder.addComponent(component); } return builder.orderNodes(); }
public DefaultSslProvider(String servername, String privateKeyPath, String certificatePath, String caCertificatePath, String clientAuthentication) { super(new ComponentModel( new BundleInstantiationSpecification(new ComponentId(COMPONENT_ID_PREFIX+servername), fromString(COMPONENT_CLASS), fromString(COMPONENT_BUNDLE)))); this.privateKeyPath = privateKeyPath; this.certificatePath = certificatePath; this.caCertificatePath = caCertificatePath; this.clientAuthentication = mapToConfigEnum(clientAuthentication); }
@Override protected JettyHttpServer doBuild(DeployState deployState, AbstractConfigProducer ancestor, Element http) { JettyHttpServer jettyHttpServer = new JettyHttpServer(new ComponentId("jdisc-jetty")); for (Element serverSpec: XML.getChildren(http, "server")) { ConnectorFactory connectorFactory = new JettyConnectorBuilder().build(deployState, ancestor, serverSpec); jettyHttpServer.addConnector(connectorFactory); } return jettyHttpServer; } }
private static ChainSpecification vespaSearchChainSpecification() { return new ChainSpecification( new ComponentId("vespa"), inherits(nativeSearchChainSpecification().componentId), noPhases(), noSearcherReferences()); }
private static ChainSpecification vespaPhasesSpecification() { return new ChainSpecification( new ComponentId("vespaPhases"), new ChainSpecification.Inheritance(null, null), PhasesCreator.linearPhases( PhaseNames.RAW_QUERY, PhaseNames.TRANSFORMED_QUERY, PhaseNames.BLENDED_RESULT, PhaseNames.UNBLENDED_RESULT, PhaseNames.BACKEND), noSearcherReferences()); }
private Document createConcreteDocument(Document document, ContainerDocumentConfig.Doctype typeConfig) { String componentId = typeConfig.factorycomponent(); // Class name of the factory AbstractConcreteDocumentFactory cdf = docFactoryRegistry.getComponent(new ComponentId(componentId)); if (cdf == null) { log.fine("Unable to get document factory component '" + componentId + "' from document factory registry."); return document; } return cdf.getDocumentCopy(document.getDataType().getName(), document, document.getId()); }
private static void addIndexingChain(ContainerCluster containerCluster) { DocprocChain chainAlreadyPresent = containerCluster.getDocprocChains().allChains(). getComponent(new ComponentId(IndexingDocprocChain.NAME)); if (chainAlreadyPresent != null) { if (chainAlreadyPresent instanceof IndexingDocprocChain) return; throw new IllegalArgumentException("A docproc chain may not have the ID '" + IndexingDocprocChain.NAME + ", since this is reserved by Vespa. Please use a different ID."); } containerCluster.getDocprocChains().add(new IndexingDocprocChain()); }
private static ChainSpecification createChainSpecification(ChainsConfig.Chains config) { return new ChainSpecification(new ComponentId(config.id()), createInheritance(config.inherits(), config.excludes()), createPhases(config.phases()), createComponentSpecifications(config.components())); }
/** Converts the specification to an id */ public ComponentId toId() { Version version = (getVersionSpecification() == VersionSpecification.emptyVersionSpecification) ? Version.emptyVersion : getVersionSpecification().lowestMatchingVersion(); return new ComponentId(getName(), version, getNamespace()); }
public ComponentId nestInNamespace(ComponentId namespace) { if (namespace == null) { return this; } else { ComponentId newNamespace = getNamespace() == null ? namespace : getNamespace().nestInNamespace(namespace); return new ComponentId(getName(), getVersion(), newNamespace); } }