public class CouchbaseClusterParser extends AbstractSingleBeanDefinitionParser
Cluster definition.
Such a definition can be tuned by either referencing a CouchbaseEnvironment via
the "env-ref" attribute or define a custom environment inline via
the <"env"> tag (not recommended, environments should be
shared as possible). If no environment reference or inline description is provided, the
default environment reference is used.
To bootstrap the connection, one can provide IPs or hostnames of nodes to connect to
via 1 or more <"node"> tags.| Modifier and Type | Field and Description |
|---|---|
static String |
CLUSTER_ENVIRONMENT_REF
The <env-ref> attribute allows to use a reference to an
CouchbaseEnvironment to
tune the connection. |
static String |
CLUSTER_ENVIRONMENT_TAG
The unique <env> element in a cluster definition define the environment customizations.
|
static String |
CLUSTER_NODE_TAG
The <node> elements in a cluster definition define the bootstrap hosts to use
|
ID_ATTRIBUTE, NAME_ATTRIBUTE| Constructor and Description |
|---|
CouchbaseClusterParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doParse(Element element,
BeanDefinitionBuilder bean)
Parse the bean definition and build up the bean.
|
protected Class |
getBeanClass(Element element)
Defines the bean class that will be constructed.
|
protected void |
injectEnvElement(BeanDefinitionBuilder clusterBuilder,
Element envElement) |
protected void |
injectEnvReference(BeanDefinitionBuilder clusterBuilder,
String envRef) |
protected boolean |
parseEnvironment(BeanDefinitionBuilder clusterBuilder,
Element clusterElement) |
protected String |
resolveId(Element element,
AbstractBeanDefinition definition,
ParserContext parserContext)
Resolve the bean ID and assign a default if not set.
|
doParse, getBeanClassName, getParentName, parseInternalparse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliasespublic static final String CLUSTER_NODE_TAG
public static final String CLUSTER_ENVIRONMENT_TAG
public static final String CLUSTER_ENVIRONMENT_REF
CouchbaseEnvironment to
tune the connection.protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)
resolveId in class AbstractBeanDefinitionParserelement - the XML element which contains the attributes.definition - the bean definition to work with.parserContext - encapsulates the parsing state and configuration.protected Class getBeanClass(Element element)
getBeanClass in class AbstractSingleBeanDefinitionParserelement - the XML element which contains the attributes.protected void doParse(Element element, BeanDefinitionBuilder bean)
doParse in class AbstractSingleBeanDefinitionParserelement - the XML element which contains the attributes.bean - the builder which builds the bean.protected boolean parseEnvironment(BeanDefinitionBuilder clusterBuilder, Element clusterElement)
protected void injectEnvElement(BeanDefinitionBuilder clusterBuilder, Element envElement)
protected void injectEnvReference(BeanDefinitionBuilder clusterBuilder, String envRef)
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.