Package org.voltdb.stream.execution
Class GlobalConfigurationContext
java.lang.Object
org.voltdb.stream.execution.GlobalConfigurationContext
- All Implemented Interfaces:
ExecutionContext.ConfigurationContext
,Configuration
public class GlobalConfigurationContext
extends Object
implements ExecutionContext.ConfigurationContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.voltdb.stream.execution.Configuration
Configuration.ConfigurationPart
-
Method Summary
Modifier and TypeMethodDescription<RESULT> RESULT
configureOnce
(String identifier, Supplier<RESULT> task) findByPath
(String required, String... optional) This method obtains a value through a name or path to property from a yaml configuration.
-
Method Details
-
getContext
-
findByPath
Description copied from interface:Configuration
This method obtains a value through a name or path to property from a yaml configuration. For example consider such app.yamldata: items: - item1 - item2 work: count: 1 people: person: name: bob
call findByPath("data") to get ConfigurationPart representing map {items: [..], work: {..}} call findByPath("data", "items") to get items as list [item1, item2] call findByPath("data", "work", "count") to get items as integer (1) call findByPath("data.work", "count") to get items as integer (1) call findByPath("data.work.people.person") to get items as map {name: bob} call findByPath("big.unknown") returns empty ConfigurationPart- Specified by:
findByPath
in interfaceConfiguration
- Parameters:
required
- to access a valueoptional
- to access a value- Returns:
- ConfigurationPart representing the value
-
configureOnce
- Specified by:
configureOnce
in interfaceExecutionContext.ConfigurationContext
- Type Parameters:
RESULT
- of the task- Parameters:
identifier
- of configuratortask
- to execute for the identifier- Returns:
- result of the task
-