[RocksJava] Integrated changes from D29019.