aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/session
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-07 16:38:58 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-07 16:38:58 -0700
commitb745e3804950fefd24b38937c90c4d5c61219321 (patch)
treef362ea259e557cc6ffd778fde6b15e59be46d068 /src/main/java/org/traccar/session
parent32b39cffc6dd705e9aacbe5b8d68bc37106997d2 (diff)
downloadtrackermap-server-b745e3804950fefd24b38937c90c4d5c61219321.tar.gz
trackermap-server-b745e3804950fefd24b38937c90c4d5c61219321.tar.bz2
trackermap-server-b745e3804950fefd24b38937c90c4d5c61219321.zip
Remove drivers manager
Diffstat (limited to 'src/main/java/org/traccar/session')
-rw-r--r--src/main/java/org/traccar/session/cache/CacheManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/session/cache/CacheManager.java b/src/main/java/org/traccar/session/cache/CacheManager.java
index 102a31ecd..6ea0f252d 100644
--- a/src/main/java/org/traccar/session/cache/CacheManager.java
+++ b/src/main/java/org/traccar/session/cache/CacheManager.java
@@ -105,6 +105,13 @@ public class CacheManager {
}
}
+ public Driver findDriverByUniqueId(long deviceId, String driverUniqueId) {
+ return getDeviceObjects(deviceId, Driver.class).stream()
+ .filter(driver -> driver.getUniqueId().equals(driverUniqueId))
+ .findFirst()
+ .orElse(null);
+ }
+
public void addDevice(long deviceId) throws StorageException {
try {
lock.writeLock().lock();