/** * Factory to create a new AdvancedFSOps * * @param conf the configuration of the process * @return the appropriate instance of the class for this config and environment. */ public static AdvancedFSOps make(Map<String, Object> conf) { if (Utils.isOnWindows()) { return new AdvancedWindowsFSOps(conf); } if (ObjectReader.getBoolean(conf.get(Config.SUPERVISOR_RUN_WORKER_AS_USER), false)) { return new AdvancedRunAsUserFSOps(conf); } return new AdvancedFSOps(conf); }
/** * Factory to create a new AdvancedFSOps * @param conf the configuration of the process * @return the appropriate instance of the class for this config and environment. */ public static AdvancedFSOps make(Map<String, Object> conf) { if (Utils.isOnWindows()) { return new AdvancedWindowsFSOps(conf); } if (Utils.getBoolean(conf.get(Config.SUPERVISOR_RUN_WORKER_AS_USER), false)) { return new AdvancedRunAsUserFSOps(conf); } return new AdvancedFSOps(conf); }