/** * Method getProperties returns the properties of this FlowConnector object. The returned Map instance * is immutable to prevent changes to the underlying property values in this FlowConnector instance. * <p> * If a {@link Properties} instance was passed to the constructor, the returned object will be a flattened * {@link Map} instance. * * @return the properties (type Map) of this FlowConnector object. */ public Map<Object, Object> getProperties() { // Sub-classes of FlowConnector should rely on PropertyUtil to manage access to properties objects internally. return Collections.unmodifiableMap( PropertyUtil.asFlatMap( properties ) ); }
@Override public Map<Object, Object> getProperties() { return PropertyUtil.asFlatMap( properties ); }
protected BaseFlow( PlatformInfo platformInfo, Map<Object, Object> properties, Config defaultConfig, FlowDef flowDef ) { properties = PropertyUtil.asFlatMap( properties ); if( platformInfo != null ) this.platformInfo = platformInfo; this.name = flowDef.getName(); this.tags = flowDef.getTags(); this.runID = flowDef.getRunID(); this.classPath = flowDef.getClassPath(); if( !flowDef.getFlowDescriptor().isEmpty() ) this.flowDescriptor = new LinkedHashMap<>( flowDef.getFlowDescriptor() ); addSessionProperties( properties ); initConfig( properties, defaultConfig ); setSources( flowDef.getSourcesCopy() ); setSinks( flowDef.getSinksCopy() ); setTraps( flowDef.getTrapsCopy() ); setCheckpoints( flowDef.getCheckpointsCopy() ); initFromTaps(); retrieveSourceFields(); retrieveSinkFields(); }