com.hazelcast.config
Class Config

java.lang.Object
  extended by com.hazelcast.config.Config
All Implemented Interfaces:
DataSerializable, Serializable
Direct Known Subclasses:
ClasspathXmlConfig, FileSystemXmlConfig, InMemoryXmlConfig, UrlXmlConfig

public class Config
extends Object
implements DataSerializable

See Also:
Serialized Form

Field Summary
static int DEFAULT_PORT
           
 
Constructor Summary
Config()
           
 
Method Summary
 Config addExecutorConfig(ExecutorConfig executorConfig)
          Adds a new ExecutorConfig by name
 Config addListenerConfig(ListenerConfig listenerConfig)
           
 void addMapConfig(MapConfig mapConfig)
           
 void addMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
           
 void addMultiMapConfig(MultiMapConfig multiMapConfig)
           
 void addQueueConfig(QueueConfig queueConfig)
           
 Config addSemaphoreConfig(SemaphoreConfig semaphoreConfig)
          Adds a new SemaphoreConfig by name
 void addTopicConfig(TopicConfig topicConfig)
           
 void addWanReplicationConfig(WanReplicationConfig wanReplicationConfig)
           
 MapConfig findMatchingMapConfig(String name)
           
 QueueConfig findMatchingQueueConfig(String name)
           
 TopicConfig findMatchingTopicConfig(String name)
           
 ClassLoader getClassLoader()
           
 File getConfigurationFile()
           
 URL getConfigurationUrl()
           
 ExecutorConfig getExecutorConfig()
          Deprecated. use getExecutorConfig (name) instead
 ExecutorConfig getExecutorConfig(String name)
          Returns the ExecutorConfig for the given name
 Map<String,ExecutorConfig> getExecutorConfigMap()
           
 Collection<ExecutorConfig> getExecutorConfigs()
          Returns the collection of executor configs.
 GroupConfig getGroupConfig()
           
 String getInstanceName()
           
 String getLicenseKey()
           
 List<ListenerConfig> getListenerConfigs()
           
 ManagedContext getManagedContext()
           
 ManagementCenterConfig getManagementCenterConfig()
           
 MapConfig getMapConfig(String name)
           
 Map<String,MapConfig> getMapConfigs()
           
 MergePolicyConfig getMergePolicyConfig(String name)
           
 Map<String,MergePolicyConfig> getMergePolicyConfigs()
           
 MultiMapConfig getMultiMapConfig(String name)
           
 Map<String,MultiMapConfig> getMultiMapConfigs()
           
 NetworkConfig getNetworkConfig()
           
 PartitionGroupConfig getPartitionGroupConfig()
           
 int getPort()
           
 Properties getProperties()
           
 String getProperty(String name)
           
 Map<String,QueueConfig> getQConfigs()
           
 QueueConfig getQueueConfig(String name)
           
 SecurityConfig getSecurityConfig()
           
 SemaphoreConfig getSemaphoreConfig(String name)
          Returns the SemaphoreConfig for the given name
 Map<String,SemaphoreConfig> getSemaphoreConfigMap()
           
 Collection<SemaphoreConfig> getSemaphoreConfigs()
          Returns the collection of semaphore configs.
 TopicConfig getTopicConfig(String name)
           
 Map<String,TopicConfig> getTopicConfigs()
           
 WanReplicationConfig getWanReplicationConfig(String name)
           
 Map<String,WanReplicationConfig> getWanReplicationConfigs()
           
 String getXmlConfig()
           
 boolean isCheckCompatibility()
           
 boolean isCompatible(Config config)
           
 boolean isLiteMember()
           
 boolean isPortAutoIncrement()
           
 boolean isReuseAddress()
           
 boolean isSuperClient()
          Deprecated. as of 2.0
static boolean nameMatches(String name, String pattern)
           
 void readData(DataInput in)
           
 Config setCheckCompatibility(boolean checkCompatibility)
           
 Config setClassLoader(ClassLoader classLoader)
           
 Config setConfigurationFile(File configurationFile)
           
 Config setConfigurationUrl(URL configurationUrl)
           
 Config setExecutorConfig(ExecutorConfig executorConfig)
          Deprecated. use addExecutorConfig instead
 void setExecutorConfigMap(Map<String,ExecutorConfig> mapExecutors)
           
 Config setGroupConfig(GroupConfig groupConfig)
           
 Config setInstanceName(String instanceName)
           
 Config setLicenseKey(String licenseKey)
           
 Config setListenerConfigs(List<ListenerConfig> listenerConfigs)
           
 Config setLiteMember(boolean liteMember)
           
 void setManagedContext(ManagedContext managedContext)
           
 Config setManagementCenterConfig(ManagementCenterConfig managementCenterConfig)
           
 Config setMapConfigs(Map<String,MapConfig> mapConfigs)
           
 Config setMapQConfigs(Map<String,QueueConfig> mapQConfigs)
           
 void setMergePolicyConfigs(Map<String,MergePolicyConfig> mapMergePolicyConfigs)
           
 Config setMultiMapConfigs(Map<String,MultiMapConfig> multiMapConfigs)
           
 Config setNetworkConfig(NetworkConfig networkConfig)
           
 Config setPartitionGroupConfig(PartitionGroupConfig partitionGroupConfig)
           
 Config setPort(int port)
           
 Config setPortAutoIncrement(boolean portAutoIncrement)
           
 void setProperties(Properties properties)
           
 Config setProperty(String name, String value)
           
 void setQConfigs(Map<String,QueueConfig> mapQConfigs)
           
 Config setReuseAddress(boolean reuseAddress)
           
 Config setSecurityConfig(SecurityConfig securityConfig)
           
 void setSemaphoreConfigMap(Map<String,SemaphoreConfig> mapSemaphores)
           
 Config setSuperClient(boolean liteMember)
          Deprecated. as of 2.0
 Config setTopicConfigs(Map<String,TopicConfig> mapTopicConfigs)
           
 Config setWanReplicationConfigs(Map<String,WanReplicationConfig> wanReplicationConfigs)
           
 Config setXmlConfig(String xmlConfig)
           
 String toString()
           
 void writeData(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

Config

public Config()
Method Detail

addMergePolicyConfig

public void addMergePolicyConfig(MergePolicyConfig mergePolicyConfig)

getMergePolicyConfig

public MergePolicyConfig getMergePolicyConfig(String name)

getMergePolicyConfigs

public Map<String,MergePolicyConfig> getMergePolicyConfigs()

setMergePolicyConfigs

public void setMergePolicyConfigs(Map<String,MergePolicyConfig> mapMergePolicyConfigs)

getWanReplicationConfig

public WanReplicationConfig getWanReplicationConfig(String name)

addWanReplicationConfig

public void addWanReplicationConfig(WanReplicationConfig wanReplicationConfig)

getWanReplicationConfigs

public Map<String,WanReplicationConfig> getWanReplicationConfigs()

setWanReplicationConfigs

public Config setWanReplicationConfigs(Map<String,WanReplicationConfig> wanReplicationConfigs)

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public Config setClassLoader(ClassLoader classLoader)

setProperty

public Config setProperty(String name,
                          String value)

setProperties

public void setProperties(Properties properties)

getProperties

public Properties getProperties()

getProperty

public String getProperty(String name)

findMatchingQueueConfig

public QueueConfig findMatchingQueueConfig(String name)

getQueueConfig

public QueueConfig getQueueConfig(String name)

getMapConfig

public MapConfig getMapConfig(String name)

getMultiMapConfig

public MultiMapConfig getMultiMapConfig(String name)

findMatchingMapConfig

public MapConfig findMatchingMapConfig(String name)

findMatchingTopicConfig

public TopicConfig findMatchingTopicConfig(String name)

getTopicConfig

public TopicConfig getTopicConfig(String name)

nameMatches

public static boolean nameMatches(String name,
                                  String pattern)

getNetworkConfig

public NetworkConfig getNetworkConfig()

setNetworkConfig

public Config setNetworkConfig(NetworkConfig networkConfig)

getXmlConfig

public String getXmlConfig()
Returns:
the xmlConfig

setXmlConfig

public Config setXmlConfig(String xmlConfig)
Parameters:
xmlConfig - the xmlConfig to set

getGroupConfig

public GroupConfig getGroupConfig()

setGroupConfig

public Config setGroupConfig(GroupConfig groupConfig)

getPort

public int getPort()
Returns:
the port

setPort

public Config setPort(int port)
Parameters:
port - the port to set

isPortAutoIncrement

public boolean isPortAutoIncrement()
Returns:
the portAutoIncrement

setPortAutoIncrement

public Config setPortAutoIncrement(boolean portAutoIncrement)
Parameters:
portAutoIncrement - the portAutoIncrement to set

isReuseAddress

public boolean isReuseAddress()

setReuseAddress

public Config setReuseAddress(boolean reuseAddress)

isCheckCompatibility

public boolean isCheckCompatibility()

setCheckCompatibility

public Config setCheckCompatibility(boolean checkCompatibility)

getExecutorConfig

public ExecutorConfig getExecutorConfig()
Deprecated. use getExecutorConfig (name) instead

Returns:
the executorConfig

setExecutorConfig

public Config setExecutorConfig(ExecutorConfig executorConfig)
Deprecated. use addExecutorConfig instead

Parameters:
executorConfig - the executorConfig to set

addExecutorConfig

public Config addExecutorConfig(ExecutorConfig executorConfig)
Adds a new ExecutorConfig by name

Parameters:
executorConfig - executor config to add
Returns:
this config instance

getExecutorConfig

public ExecutorConfig getExecutorConfig(String name)
Returns the ExecutorConfig for the given name

Parameters:
name - name of the executor config
Returns:
ExecutorConfig

getExecutorConfigs

public Collection<ExecutorConfig> getExecutorConfigs()
Returns the collection of executor configs.

Returns:
collection of executor configs.

getExecutorConfigMap

public Map<String,ExecutorConfig> getExecutorConfigMap()

setExecutorConfigMap

public void setExecutorConfigMap(Map<String,ExecutorConfig> mapExecutors)

addTopicConfig

public void addTopicConfig(TopicConfig topicConfig)

getTopicConfigs

public Map<String,TopicConfig> getTopicConfigs()
Returns:
the mapTopicConfigs

setTopicConfigs

public Config setTopicConfigs(Map<String,TopicConfig> mapTopicConfigs)
Parameters:
mapTopicConfigs - the mapTopicConfigs to set

getQConfigs

public Map<String,QueueConfig> getQConfigs()
Returns:
the mapQConfigs

addQueueConfig

public void addQueueConfig(QueueConfig queueConfig)

setQConfigs

public void setQConfigs(Map<String,QueueConfig> mapQConfigs)
Parameters:
mapQConfigs - the mapQConfigs to set

setMapQConfigs

public Config setMapQConfigs(Map<String,QueueConfig> mapQConfigs)
Parameters:
mapQConfigs - the mapQConfigs to set

addMapConfig

public void addMapConfig(MapConfig mapConfig)

addMultiMapConfig

public void addMultiMapConfig(MultiMapConfig multiMapConfig)

getMapConfigs

public Map<String,MapConfig> getMapConfigs()
Returns:
the mapConfigs

getMultiMapConfigs

public Map<String,MultiMapConfig> getMultiMapConfigs()

setMapConfigs

public Config setMapConfigs(Map<String,MapConfig> mapConfigs)
Parameters:
mapConfigs - the mapConfigs to set

setMultiMapConfigs

public Config setMultiMapConfigs(Map<String,MultiMapConfig> multiMapConfigs)

addSemaphoreConfig

public Config addSemaphoreConfig(SemaphoreConfig semaphoreConfig)
Adds a new SemaphoreConfig by name

Parameters:
semaphoreConfig - semaphore config to add
Returns:
this config instance

getSemaphoreConfig

public SemaphoreConfig getSemaphoreConfig(String name)
Returns the SemaphoreConfig for the given name

Parameters:
name - name of the semaphore config
Returns:
SemaphoreConfig

getSemaphoreConfigs

public Collection<SemaphoreConfig> getSemaphoreConfigs()
Returns the collection of semaphore configs.

Returns:
collection of semaphore configs.

getSemaphoreConfigMap

public Map<String,SemaphoreConfig> getSemaphoreConfigMap()

setSemaphoreConfigMap

public void setSemaphoreConfigMap(Map<String,SemaphoreConfig> mapSemaphores)

getConfigurationUrl

public URL getConfigurationUrl()
Returns:
the configurationUrl

setConfigurationUrl

public Config setConfigurationUrl(URL configurationUrl)
Parameters:
configurationUrl - the configurationUrl to set

getConfigurationFile

public File getConfigurationFile()
Returns:
the configurationFile

setConfigurationFile

public Config setConfigurationFile(File configurationFile)
Parameters:
configurationFile - the configurationFile to set

isSuperClient

@Deprecated
public boolean isSuperClient()
Deprecated. as of 2.0

See Also:
isLiteMember()

isLiteMember

public boolean isLiteMember()

setSuperClient

@Deprecated
public Config setSuperClient(boolean liteMember)
Deprecated. as of 2.0

See Also:
setLiteMember(boolean)

setLiteMember

public Config setLiteMember(boolean liteMember)

getSecurityConfig

public SecurityConfig getSecurityConfig()

setSecurityConfig

public Config setSecurityConfig(SecurityConfig securityConfig)

addListenerConfig

public Config addListenerConfig(ListenerConfig listenerConfig)

getListenerConfigs

public List<ListenerConfig> getListenerConfigs()

setListenerConfigs

public Config setListenerConfigs(List<ListenerConfig> listenerConfigs)

getPartitionGroupConfig

public PartitionGroupConfig getPartitionGroupConfig()

setPartitionGroupConfig

public Config setPartitionGroupConfig(PartitionGroupConfig partitionGroupConfig)

getManagedContext

public ManagedContext getManagedContext()

setManagedContext

public void setManagedContext(ManagedContext managedContext)

isCompatible

public boolean isCompatible(Config config)
Parameters:
config -
Returns:
true if config is compatible with this one, false if config belongs to another group
Throws:
RuntimeException - if map, queue, topic configs are incompatible

readData

public void readData(DataInput in)
              throws IOException
Specified by:
readData in interface DataSerializable
Throws:
IOException

writeData

public void writeData(DataOutput out)
               throws IOException
Specified by:
writeData in interface DataSerializable
Throws:
IOException

getInstanceName

public String getInstanceName()

setInstanceName

public Config setInstanceName(String instanceName)

getLicenseKey

public String getLicenseKey()

setLicenseKey

public Config setLicenseKey(String licenseKey)

getManagementCenterConfig

public ManagementCenterConfig getManagementCenterConfig()

setManagementCenterConfig

public Config setManagementCenterConfig(ManagementCenterConfig managementCenterConfig)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012 Hazel Ltd. All Rights Reserved.