Package com.hazelcast.config
Class ClasspathXmlConfig
- java.lang.Object
-
- com.hazelcast.config.Config
-
- com.hazelcast.config.ClasspathXmlConfig
-
public class ClasspathXmlConfig extends Config
AConfig
which is initialized by loading an XML configuration file from the classpath.Unlike
Config.loadFromClasspath(ClassLoader, String)
and its variants, a configuration constructed viaClasspathXmlConfig
does not apply overrides found in environment variables/system properties.- See Also:
FileSystemXmlConfig
-
-
Field Summary
-
Fields inherited from class com.hazelcast.config.Config
DEFAULT_CLUSTER_NAME
-
-
Constructor Summary
Constructors Constructor Description ClasspathXmlConfig(java.lang.ClassLoader classLoader, java.lang.String resource)
Creates a config which is loaded from a classpath resource.ClasspathXmlConfig(java.lang.ClassLoader classLoader, java.lang.String resource, java.util.Properties properties)
Creates a config which is loaded from a classpath resource.ClasspathXmlConfig(java.lang.String resource)
Creates a config which is loaded from a classpath resource using theThread.currentThread()
contextClassLoader.ClasspathXmlConfig(java.lang.String resource, java.util.Properties properties)
Creates a config which is loaded from a classpath resource using theThread.currentThread()
contextClassLoader.
-
Method Summary
-
Methods inherited from class com.hazelcast.config.Config
addCacheConfig, addCardinalityEstimatorConfig, addDataConnectionConfig, addDeviceConfig, addDurableExecutorConfig, addExecutorConfig, addFlakeIdGeneratorConfig, addListConfig, addListenerConfig, addMapConfig, addMultiMapConfig, addPNCounterConfig, addQueueConfig, addReliableTopicConfig, addReplicatedMapConfig, addRingBufferConfig, addScheduledExecutorConfig, addSetConfig, addSplitBrainProtectionConfig, addTopicConfig, addWanReplicationConfig, findCacheConfig, findCacheConfigOrNull, findCardinalityEstimatorConfig, findDataConnectionConfig, findDurableExecutorConfig, findExecutorConfig, findFlakeIdGeneratorConfig, findListConfig, findMapConfig, findMultiMapConfig, findPNCounterConfig, findQueueConfig, findReliableTopicConfig, findReplicatedMapConfig, findRingbufferConfig, findScheduledExecutorConfig, findSetConfig, findSplitBrainProtectionConfig, findTopicConfig, getAdvancedNetworkConfig, getAuditlogConfig, getCacheConfig, getCacheConfigs, getCardinalityEstimatorConfig, getCardinalityEstimatorConfigs, getClassLoader, getClusterName, getConfigPatternMatcher, getConfigurationFile, getConfigurationUrl, getCPSubsystemConfig, getCRDTReplicationConfig, getDataConnectionConfig, getDataConnectionConfigs, getDeviceConfig, getDeviceConfig, getDeviceConfigs, getDurableExecutorConfig, getDurableExecutorConfigs, getDynamicConfigurationConfig, getExecutorConfig, getExecutorConfigs, getFlakeIdGeneratorConfig, getFlakeIdGeneratorConfigs, getHotRestartPersistenceConfig, getInstanceName, getInstanceTrackingConfig, getIntegrityCheckerConfig, getJetConfig, getLicenseKey, getListConfig, getListConfigs, getListenerConfigs, getManagedContext, getManagementCenterConfig, getMapConfig, getMapConfigOrNull, getMapConfigs, getMemberAttributeConfig, getMetricsConfig, getMultiMapConfig, getMultiMapConfigs, getNativeMemoryConfig, getNetworkConfig, getPartitionGroupConfig, getPersistenceConfig, getPNCounterConfig, getPNCounterConfigs, getProperties, getProperty, getQueueConfig, getQueueConfigs, getReliableTopicConfig, getReliableTopicConfigs, getReplicatedMapConfig, getReplicatedMapConfigs, getRingbufferConfig, getRingbufferConfigs, getScheduledExecutorConfig, getScheduledExecutorConfigs, getSecurityConfig, getSerializationConfig, getServicesConfig, getSetConfig, getSetConfigs, getSplitBrainProtectionConfig, getSplitBrainProtectionConfigs, getSqlConfig, getTopicConfig, getTopicConfigs, getTpcConfig, getUserCodeDeploymentConfig, getUserContext, getWanReplicationConfig, getWanReplicationConfigs, isLiteMember, load, loadDefault, loadDefault, loadFromClasspath, loadFromClasspath, loadFromFile, loadFromFile, loadFromStream, loadFromStream, loadFromString, loadFromString, setAdvancedNetworkConfig, setAuditlogConfig, setCacheConfigs, setCardinalityEstimatorConfigs, setClassLoader, setClusterName, setConfigPatternMatcher, setConfigurationFile, setConfigurationUrl, setCPSubsystemConfig, setCRDTReplicationConfig, setDataConnectionConfigs, setDeviceConfigs, setDurableExecutorConfigs, setDynamicConfigurationConfig, setExecutorConfigs, setFlakeIdGeneratorConfigs, setHotRestartPersistenceConfig, setInstanceName, setInstanceTrackingConfig, setIntegrityCheckerConfig, setJetConfig, setLicenseKey, setListConfigs, setListenerConfigs, setLiteMember, setManagedContext, setManagementCenterConfig, setMapConfigs, setMemberAttributeConfig, setMetricsConfig, setMultiMapConfigs, setNativeMemoryConfig, setNetworkConfig, setPartitionGroupConfig, setPersistenceConfig, setPNCounterConfigs, setProperties, setProperty, setQueueConfigs, setReliableTopicConfigs, setReplicatedMapConfigs, setRingbufferConfigs, setScheduledExecutorConfigs, setSecurityConfig, setSerializationConfig, setSetConfigs, setSplitBrainProtectionConfigs, setSqlConfig, setTopicConfigs, setTpcConfig, setUserCodeDeploymentConfig, setUserContext, setWanReplicationConfigs, toString
-
-
-
-
Constructor Detail
-
ClasspathXmlConfig
public ClasspathXmlConfig(java.lang.String resource)
Creates a config which is loaded from a classpath resource using theThread.currentThread()
contextClassLoader. The System.properties are used to resolve variables in the XML.- Parameters:
resource
- the resource, an XML configuration file from the classpath, without the "classpath:" prefix- Throws:
java.lang.IllegalArgumentException
- if the resource could not be foundInvalidConfigurationException
- if the XML content is invalid
-
ClasspathXmlConfig
public ClasspathXmlConfig(java.lang.String resource, java.util.Properties properties)
Creates a config which is loaded from a classpath resource using theThread.currentThread()
contextClassLoader.- Parameters:
resource
- the resource, an XML configuration file from the classpath, without the "classpath:" prefixproperties
- the Properties to resolve variables in the XML- Throws:
java.lang.IllegalArgumentException
- if the resource could not be found or if properties isnull
InvalidConfigurationException
- if the XML content is invalid
-
ClasspathXmlConfig
public ClasspathXmlConfig(java.lang.ClassLoader classLoader, java.lang.String resource)
Creates a config which is loaded from a classpath resource. The System.properties are used to resolve variables in the XML.- Parameters:
classLoader
- the ClassLoader used to load the resourceresource
- the resource, an XML configuration file from the classpath, without the "classpath:" prefix- Throws:
java.lang.IllegalArgumentException
- if classLoader or resource isnull
, or if the resource is not foundInvalidConfigurationException
- if the XML content is invalid
-
ClasspathXmlConfig
public ClasspathXmlConfig(java.lang.ClassLoader classLoader, java.lang.String resource, java.util.Properties properties)
Creates a config which is loaded from a classpath resource.- Parameters:
classLoader
- the ClassLoader used to load the resourceresource
- the resource, an XML configuration file from the classpath, without the "classpath:" prefixproperties
- the properties used to resolve variables in the XML- Throws:
java.lang.IllegalArgumentException
- if classLoader or resource isnull
, or if the resource is not foundInvalidConfigurationException
- if the XML content is invalid
-
-