Ultra-fast NoSQL Indexing and Query Engine for Java Collections
Orders of magnitude faster than iterating collections. Execute 1.1+ million queries per second with sub-microsecond latency.
Familiar query syntax with complex boolean logic. Write queries like SQL but on in-memory Java collections.
Hash, NavigableSet, Radix Tree, Suffix Tree, and more. Choose the perfect index for your query patterns.
Store data on-heap, off-heap, on disk, or in SQLite. Scale from memory to persistent storage seamlessly.
Concurrent reads and writes supported with MVCC transaction isolation. Lock-free concurrent operations.
Core library has no external dependencies. Add only what you need for optional features.
CQEngine dramatically outperforms naive and optimized iteration for range queries on a single 1.8GHz CPU core.
Complex queries on cached data with ultra-low latency for real-time applications.
Live data analysis with sub-millisecond query responses for dashboards and monitoring.
High-performance filtering and aggregation for large datasets in memory.
Desktop and mobile applications requiring local data storage and querying.
Continuous queries on streaming data with automatic index updates.
Real-time exposure and counterparty limit validation in financial systems.
<dependency> <groupId>io.github.msaifasif</groupId> <artifactId>cqengine</artifactId> <version>1.0.0</version> </dependency>
import com.googlecode.cqengine.*; import com.googlecode.cqengine.query.Query; import static com.googlecode.cqengine.query.QueryFactory.*; // Create an indexed collection IndexedCollection<Car> cars = new ConcurrentIndexedCollection<>(); // Add indexes for fast queries cars.addIndex(NavigableIndex.onAttribute(Car.CAR_ID)); cars.addIndex(HashIndex.onAttribute(Car.MANUFACTURER)); cars.addIndex(NavigableIndex.onAttribute(Car.PRICE)); // Add data cars.add(new Car(1, "Ford", "Focus", Color.BLUE, 5, 9000.50)); cars.add(new Car(2, "Honda", "Civic", Color.RED, 5, 5000.00)); // Query with SQL-like syntax Query<Car> query = and( equal(Car.MANUFACTURER, "Ford"), lessThan(Car.PRICE, 10000.0) ); ResultSet<Car> results = cars.retrieve(query); for (Car car : results) { System.out.println(car); }
"Used for exposure and counterparty limit checking in financial trading systems."
"Powers our marketing intelligence platform with real-time data analysis."
"Processes 3-5 billion requests per day with ultra-low latency requirements."
This is a maintained fork of the original CQEngine by Niall Gallagher, updated for modern Java development.
Full compatibility with latest Java features
All dependencies updated with security fixes
OS-independent integration tests
Continued development and support