rrrooommmaaa / datastax-java-driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

datastax-java-driver

The assignment was to implement custom request types for DataStax Cassandra Java Driver following Producer/Consumer pattern.

CustomRequestProcessor was implemented to return Producer<Row> result for CQL-compatible requests. The solution

  • is thread-safe,
  • stores temporary items in a queue, and drains it whenever the consumer requests more items,
  • has a non-blocking, lock-free queue-drain pattern using atomic variables,
  • uses ForkJoinPool for lock-free data pumping,
  • supports Producer.cancel to avoid data pumping when no longer required,
  • implements filter, map and reduce methods for producers that allows a data flow preserving the above-mentioned features.
  • covered with unit and integration tests.

About


Languages

Language:Java 100.0%