aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/ConnectionManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-17 16:28:36 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-17 16:28:36 +1200
commit3f6f92cedd969e741e65bb6e14737b98722b214e (patch)
tree97b19d441bb9f79c73db493d6ad52b2e422ec1ba /src/org/traccar/database/ConnectionManager.java
parentb6ba5a8ac60e8013e22ed44b15ffdc5ad8097060 (diff)
downloadtrackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.tar.gz
trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.tar.bz2
trackermap-server-3f6f92cedd969e741e65bb6e14737b98722b214e.zip
Start re-factoring commands
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) {