java/db: Adding a local only mode.

When we are in a one consistency mode, it's better to stick with the local host.