* Lazy AMQP connection and forwarding error logging
* Fix AMQP resource management: store and close Connection on reconnect
* Simplify AMQP exception handling
Extract closeQuietly helper for AutoCloseable, unify connect and publish
under a single try, and always throw on failure so callers report via
ResultHandler instead of silently swallowing connect errors.
* Add validation for position coordinates
Validate longitude and latitude before setting position.
* Rename test method and remove Disabled annotation
* Refactor BceProtocolDecoderTest to simplify tests
* Fix BceProtocolDecoder to simplify position decoding
* Refactor decodeMask1 and improve error handling
* index handling in decodeMask1 method
* Add DATABASE_SAVE_POSITIONS config key
* Inject Config to DatabaseHandler and manage savePositions
* Add conditional position saving in PostProcessHandler
Refactor PostProcessHandler to conditionally save positions based on configuration.
* Fix missing newline in PostProcessHandler.java
Add missing newline at end of file
* Add DATABASE_SAVE_EVENTS config key
Add configuration key for saving events in the database.
* Add saveEvents flag to NotificationManager
* Remove database save positions and events config keys
Removed configuration keys for saving positions and events in the database.
* Remove saveEvents handling from NotificationManager
Removed the saveEvents variable and related logic from the NotificationManager class.
* Refactor DatabaseHandler to remove savePositions config
Removed dependency on config for saving positions and simplified the DatabaseHandler constructor.
* Refactor PostProcessHandler to remove savePositions
Removed unused config dependency and related logic for saving positions.
* Add latestPositionIds map to MemoryStorage
* Update MemoryStorage.java
* Optimize position handling in MemoryStorage
Refactor position storage logic to use iterator for removal.
* Update src/main/java/org/traccar/storage/MemoryStorage.java
Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
* Refactor MemoryStorage to eliminate duplicate put calls
Removed redundant code for putting entity in items.
---------
Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
* Make memory storage concurrent-safe
Update `MemoryStorage` to use concurrent collections for shared in-memory object and permission maps.
The previous implementation used regular `HashMap` instances and exposed lazy streams over `values()`. With `database.memory=true` and `database.registerUnknown=true`, concurrent device logins can read from `getObjectsStream()` while another thread registers or updates an object, which can trigger `ConcurrentModificationException`.
This change replaces the shared maps with `ConcurrentHashMap`, centralizes object-map creation through `getObjectMap()`, and uses concurrent permission sets. This keeps the in-memory storage behavior unchanged while making concurrent access from decoder/session threads safer.
* reforge as inline
* Make memory storage maps thread-safe
Use concurrent maps and sets in MemoryStorage to avoid ConcurrentModificationException when memory storage is accessed from multiple protocol threads.
* Simplify server storage initialization in MemoryStorage
one line