bin/java-flatten-cache: concurrency

Signed-off-by: Bao Haojun <baohaojun@gmail.com>