repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor(simulator): refine LRU cache type name
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
SharedLRUCache.ts
diff --git
a/src/charging-station/SharedLRUCache.ts
b/src/charging-station/SharedLRUCache.ts
index b58dc79ee6a9509c3fc5a79bf4605487b500d174..bb1c0c07e3749e99b6ee76a4d8e3486696f6eac4 100644
(file)
--- a/
src/charging-station/SharedLRUCache.ts
+++ b/
src/charging-station/SharedLRUCache.ts
@@
-9,14
+9,14
@@
enum CacheType {
chargingStationConfiguration = 'chargingStationConfiguration',
}
chargingStationConfiguration = 'chargingStationConfiguration',
}
-type Cache
abl
eType = ChargingStationTemplate | ChargingStationConfiguration;
+type Cache
Valu
eType = ChargingStationTemplate | ChargingStationConfiguration;
export class SharedLRUCache {
private static instance: SharedLRUCache | null = null;
export class SharedLRUCache {
private static instance: SharedLRUCache | null = null;
- private readonly lruCache: LRUCache<string, Cache
abl
eType>;
+ private readonly lruCache: LRUCache<string, Cache
Valu
eType>;
private constructor() {
private constructor() {
- this.lruCache = new LRUCache<string, Cache
abl
eType>(
+ this.lruCache = new LRUCache<string, Cache
Valu
eType>(
Bootstrap.getInstance().numberOfChargingStationTemplates +
Bootstrap.getInstance().numberOfChargingStations
);
Bootstrap.getInstance().numberOfChargingStationTemplates +
Bootstrap.getInstance().numberOfChargingStations
);
@@
-93,11
+93,11
@@
export class SharedLRUCache {
return this.lruCache.has(key);
}
return this.lruCache.has(key);
}
- private get(key: string): Cache
abl
eType | undefined {
+ private get(key: string): Cache
Valu
eType | undefined {
return this.lruCache.get(key);
}
return this.lruCache.get(key);
}
- private set(key: string, value: Cache
abl
eType): void {
+ private set(key: string, value: Cache
Valu
eType): void {
this.lruCache.set(key, value);
}
this.lruCache.set(key, value);
}