|
public Node nodeById(long id) { |
|
public synchronized void add(Node node) { |
If there are two threads, one is writing the database and the other is reading the database via id.
Then the reading thread can't observe the result of the writing thread.
@mpollmeier