renaming (pool size != max pool size)
[e-mobility-charging-stations-simulator.git] / src / utils / Configuration.ts
index 760695253531f6c64863315287eb36063895b5a7..eb1992b3dc33a75a4a063897dfcb48da93ec1132 100644 (file)
@@ -41,8 +41,12 @@ export default class Configuration {
     return Configuration.getConfig().useWorkerPool;
   }
 
-  static getWorkerPoolSize(): number {
-    return Configuration.getConfig().workerPoolSize;
+  static getWorkerMaxPoolSize(): number {
+    return Configuration.getConfig().workerMaxPoolSize;
+  }
+
+  static getChargingStationsPerWorker(): number {
+    return Configuration.objectHasOwnProperty(Configuration.getConfig(), 'chargingStationsPerWorker') ? Configuration.getConfig().chargingStationsPerWorker : 1;
   }
 
   static getLogConsole(): boolean {
@@ -100,7 +104,7 @@ export default class Configuration {
   }
 
   private static objectHasOwnProperty(object: any, property: string): boolean {
-    return Object.prototype.hasOwnProperty.call(object, property);
+    return Object.prototype.hasOwnProperty.call(object, property) as boolean;
   }
 
   private static isUndefined(obj: any): boolean {