save query id in java, add native declaration for interrupts
reuse an instance of query