- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,,Object> Copyable<Configuration>,FluentImports<Configuration>
public class Configuration
extends Properties
implements Copyable<Configuration>, FluentImports<Configuration>
Configuration class represents a configuration object that extends the Properties class and
implements the Copyable and FluentImports interfaces.
Initial configuration is supplied to the KnowledgeService and then copied down to instances of Knowledge and RuleSession.
This way, changes in the configuration of a Knowledge instance will be passed down to every RuleSession spawned from that instance after the change. However, changes in the configuration of a RuleSession will only be available to that session.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final booleanFields inherited from class java.util.Properties
defaults -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ConfigurationAdds an import statement using its string representation.copyOf()booleangetAsBoolean(String property) Retrieves the value of a property as a boolean.booleangetAsBoolean(String property, boolean defaultValue) Retrieves the value of a property as a boolean.intgetAsInteger(String property, int defaultValue) Retrieves the current set of import statements.setProperty(String key, String value) Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.evrete.api.FluentImports
addImport, getJavaImports
-
Field Details
-
OBJECT_COMPARE_METHOD
- See Also:
-
INSERT_BUFFER_SIZE
- See Also:
-
WARN_UNKNOWN_TYPES
- See Also:
-
WARN_UNKNOWN_TYPES_DEFAULT
public static final boolean WARN_UNKNOWN_TYPES_DEFAULT- See Also:
-
DAEMON_INNER_THREADS
- See Also:
-
DAEMON_INNER_THREADS_DEFAULT
public static final boolean DAEMON_INNER_THREADS_DEFAULT- See Also:
-
IDENTITY_METHOD_EQUALS
- See Also:
-
IDENTITY_METHOD_IDENTITY
- See Also:
-
SPI_EXPRESSION_RESOLVER
- See Also:
-
RULE_BASE_CLASS
- See Also:
-
SPI_LHS_STRIP_WHITESPACES
- See Also:
-
DISABLE_LITERAL_DATA
- See Also:
-
-
Constructor Details
-
Configuration
-
Configuration
public Configuration()
-
-
Method Details
-
set
-
setProperty
- Overrides:
setPropertyin classProperties
-
getAsBoolean
Retrieves the value of a property as a boolean.- Parameters:
property- the name of the property- Returns:
- the value of the property as a boolean
-
getAsBoolean
Retrieves the value of a property as a boolean. If the property is not found, it returns the default value provided.- Parameters:
property- the name of the propertydefaultValue- the default value to be returned if the property is not found- Returns:
- the value of the property as a boolean, or the default value if the property is not found
-
getAsInteger
-
getImports
Description copied from interface:FluentImportsRetrieves the current set of import statements.- Specified by:
getImportsin interfaceFluentImports<Configuration>- Returns:
- an
Importsobject containing the current set of import statements
-
addImport
Description copied from interface:FluentImportsAdds an import statement using its string representation.- Specified by:
addImportin interfaceFluentImports<Configuration>- Parameters:
imp- the full canonical name of the class or package to be imported- Returns:
- this instance to allow for method chaining
-
copyOf
- Specified by:
copyOfin interfaceCopyable<Configuration>
-