/** * Later entries in the configs array override earlier entries. */ public static MultiPropertiesConfig combine( MultiPropertiesConfig[] configs ) { return ConfigUtils.combine( configs ); }
static List vmCondensedPaths(String[] defaultResources, String[] preemptingResources, List delayedLogItemsOut) { List raw = condensePaths( new String[][]{ defaultResources, vmResourcePaths( delayedLogItemsOut ), preemptingResources } ); return ensureHoconInterresolvability( raw ); }
/** * @deprecated Please use the MConfig facade class to acquire configuration */ public static MultiPropertiesConfig readVmConfig(String[] defaultResources, String[] preemptingResources ) { return ConfigUtils.readVmConfig( defaultResources, preemptingResources ); }
public static MultiPropertiesConfig readVmConfig(String[] defaultResources, String[] preemptingResources, List delayedLogItemsOut) { defaultResources = ( defaultResources == null ? NO_PATHS : defaultResources ); preemptingResources = ( preemptingResources == null ? NO_PATHS : preemptingResources ); List pathsList = vmCondensedPaths( defaultResources, preemptingResources, delayedLogItemsOut ); if ( delayedLogItemsOut != null ) delayedLogItemsOut.add( new DelayedLogItem(Level.FINER, "Reading VM config for path list " + stringFromPathsList( pathsList ) ) ); return read( (String[]) pathsList.toArray(new String[pathsList.size()]), delayedLogItemsOut ); }
String[] elements = path.substring("hocon:".length()).split("\\s*,\\s*"); for ( int i = 0, len = elements.length; i < len; ++i ) elements[i] = normalizeHoconPathElement( elements[i] ); hoconPathToElementsList.put( path, Arrays.asList( elements ) ); for (String element : elements ) { putToSet(elementToHoconPaths, element, path ); if ( element.indexOf('.') < 0 && !"/".equals( element ) ) { putToSet( elementToHoconPaths, element + ".conf", path ); putToSet( elementToHoconPaths, element + ".properties", path ); putToSet( elementToHoconPaths, element + ".json", path ); out.add( makeHoconPathFromElements( newElementsList ) ); } else { out.add( path );
private static List readResourcePathsFromResourcePathsTextFiles( String[] resourcePathsTextFileResourcePaths, List delayedLogItemsOut ) { List out = new ArrayList(); for ( int i = 0, len = resourcePathsTextFileResourcePaths.length; i < len; ++i ) out.addAll( readResourcePathsFromResourcePathsTextFile( resourcePathsTextFileResourcePaths[i], delayedLogItemsOut ) ); return out; }
private static List vmResourcePathList( List delayedLogItemsOut ) { List pathsFromFiles = readResourcePathsFromResourcePathsTextFiles( DFLT_VM_RSRC_PATHFILES, delayedLogItemsOut ); List rps; if ( pathsFromFiles.size() > 0 ) rps = pathsFromFiles; else rps = Arrays.asList( HARDCODED_DFLT_RSRC_PATHS ); return rps; }
public Object recreateFromKey(Object key) throws Exception { PathsKey pk = (PathsKey) key; /* for( Iterator ii = pk.delayedLogItems.iterator(); ii.hasNext(); ) { DelayedLogItem pm = (DelayedLogItem) ii.next(); logger.log( pm.getLevel(), pm.getText(), pm.getException() ); } */ List<DelayedLogItem> items = new ArrayList<DelayedLogItem>(); items.addAll( pk.delayedLogItems ); Object out = ConfigUtils.read( pk.paths, items ); dumpToLogger( items, logger ); return out; } }
/** * @deprecated Please use the MConfig facade class to acquire configuration */ public static MultiPropertiesConfig readVmConfig() { return ConfigUtils.readVmConfig(); }
public synchronized static MultiPropertiesConfig readVmConfig() { return readVmConfig( (List) null ); }
public static MultiPropertiesConfig readVmConfig(String[] defaultResources, String[] preemptingResources ) { return readVmConfig( defaultResources, preemptingResources, (List) null ); }
public static MultiPropertiesConfig readVmConfig(String[] defaultResources, String[] preemptingResources, List delayedLogItemsOut) { return ConfigUtils.readVmConfig( defaultResources, preemptingResources, delayedLogItemsOut); }