How do I use the Java API to update by query in 5.x?

Sorry about the silly question: I feel like I must be missing something obvious: I have read about the the update_by_query API but I am not finding a way to use it in the Java interface. Is this feature supported in the Java client yet?

Some nice person answered this over on stackoverflow. The answer looks right to me even though it mentions 2.3. Just replace with 5.0.0 and it should work fine.