Class GlobalConfigurationContext

java.lang.Object
org.voltdb.stream.execution.GlobalConfigurationContext
All Implemented Interfaces:
ExecutionContext.ConfigurationContext, Configuration

public class GlobalConfigurationContext extends Object implements ExecutionContext.ConfigurationContext
  • Method Details

    • getContext

      public static ExecutionContext.ConfigurationContext getContext()
    • findByPath

      public Configuration.ConfigurationPart findByPath(String required, String... optional)
      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.yaml
       data:
         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 interface Configuration
      Parameters:
      required - to access a value
      optional - to access a value
      Returns:
      ConfigurationPart representing the value
    • configureOnce

      public <RESULT> RESULT configureOnce(String identifier, Supplier<RESULT> task)
      Specified by:
      configureOnce in interface ExecutionContext.ConfigurationContext
      Type Parameters:
      RESULT - of the task
      Parameters:
      identifier - of configurator
      task - to execute for the identifier
      Returns:
      result of the task