aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/ConnectionManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database/ConnectionManager.java')
-rw-r--r--src/org/traccar/database/ConnectionManager.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/database/ConnectionManager.java b/src/org/traccar/database/ConnectionManager.java
index dc125d7b0..39ec465e6 100644
--- a/src/org/traccar/database/ConnectionManager.java
+++ b/src/org/traccar/database/ConnectionManager.java
@@ -31,7 +31,7 @@ import org.traccar.model.Position;
public class ConnectionManager {
- private final Map<String, ActiveDevice> activeDevices = new HashMap<>();
+ private final Map<Long, ActiveDevice> activeDevices = new HashMap<>();
private final Map<Long, Position> positions = new HashMap<>();
private final Map<Long, Set<DataCacheListener>> listeners = new HashMap<>();
@@ -47,12 +47,12 @@ public class ConnectionManager {
}
}
- public void setActiveDevice(String uniqueId, Protocol protocol, Channel channel, SocketAddress remoteAddress) {
- activeDevices.put(uniqueId, new ActiveDevice(uniqueId, protocol, channel, remoteAddress));
+ public void setActiveDevice(long deviceId, Protocol protocol, Channel channel, SocketAddress remoteAddress) {
+ activeDevices.put(deviceId, new ActiveDevice(deviceId, protocol, channel, remoteAddress));
}
- public ActiveDevice getActiveDevice(String uniqueId) {
- return activeDevices.get(uniqueId);
+ public ActiveDevice getActiveDevice(long deviceId) {
+ return activeDevices.get(deviceId);
}
public synchronized void update(Position position) {