Package com.hazelcast.config
Class AbstractFactoryWithPropertiesConfig<T extends AbstractFactoryWithPropertiesConfig<T>>
java.lang.Object
com.hazelcast.config.AbstractFactoryWithPropertiesConfig<T>
- Type Parameters:
T
- final child type
- Direct Known Subclasses:
AuditlogConfig
,SSLConfig
public abstract class AbstractFactoryWithPropertiesConfig<T extends AbstractFactoryWithPropertiesConfig<T>> extends Object
Configuration base for config types with a factory class and its properties.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
enabled
protected String
factoryClassName
protected Properties
properties
-
Constructor Summary
Constructors Constructor Description AbstractFactoryWithPropertiesConfig()
-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
String
getFactoryClassName()
Returns the factory class name.Properties
getProperties()
Gets all properties.String
getProperty(String name)
Gets a property.int
hashCode()
boolean
isEnabled()
Returns if this configuration is enabled.protected abstract T
self()
T
setEnabled(boolean enabled)
Enables and disables this configuration.T
setFactoryClassName(String factoryClassName)
Sets the factory class name.T
setProperties(Properties properties)
Sets the properties.T
setProperty(String name, String value)
Sets a single property.String
toString()
-
Field Details
-
enabled
protected boolean enabled -
factoryClassName
-
properties
-
-
Constructor Details
-
AbstractFactoryWithPropertiesConfig
public AbstractFactoryWithPropertiesConfig()
-
-
Method Details
-
getFactoryClassName
Returns the factory class name. -
setFactoryClassName
Sets the factory class name. -
isEnabled
public boolean isEnabled()Returns if this configuration is enabled.- Returns:
true
if enabled,false
otherwise
-
setEnabled
Enables and disables this configuration.- Parameters:
enabled
-true
to enable,false
to disable
-
setProperty
Sets a single property.- Parameters:
name
- the name of the property to setvalue
- the value of the property to set- Returns:
- the updated config object (self)
- Throws:
NullPointerException
- if name or value isnull
-
getProperty
Gets a property.- Parameters:
name
- the name of the property to get- Returns:
- the value of the property, null if not found
- Throws:
NullPointerException
- if name isnull
-
getProperties
Gets all properties.- Returns:
- the properties
-
setProperties
Sets the properties.- Parameters:
properties
- the properties to set- Returns:
- the updated config object (self)
- Throws:
IllegalArgumentException
- if properties isnull
-
toString
-
equals
-
hashCode
public int hashCode() -
self
-