aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/ConnectionManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-17 22:51:09 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-17 22:51:09 +1200
commit466e704934894ed44458bec798fa9fad0532bb4c (patch)
treeeaf48175234c9d4d1b0456a542887a90c1377d00 /src/org/traccar/database/ConnectionManager.java
parent6bfaa4bdedcf6719de75afa905a309296aa1bd9d (diff)
parentff640cf8eb19cfeb3c8475ffd9b0aeccbd769f96 (diff)
downloadtrackermap-server-466e704934894ed44458bec798fa9fad0532bb4c.tar.gz
trackermap-server-466e704934894ed44458bec798fa9fad0532bb4c.tar.bz2
trackermap-server-466e704934894ed44458bec798fa9fad0532bb4c.zip
Merge commands implementation (fix #7)
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) {