OPENDJ-1448 Remove JReplicaDB flushing thread and msg queue
It seems unnecessary to have a msgQueue on top of JE since JE's already has a builtin cache that handles the same responsibility.
This improvement removes the JEReplicaDB.msgQueue and the associated flushing thread to save on memory and resources.
Code cleanup in JEChangeNumberIndexDB after CR-3388.
JEReplicaDB.java:
Does not implement Runnable anymore.
Removed fields msgQueue, queueSizeBytes, queueMaxBytes, thread, flushLock.
Added and used shutdown field to compensate for removing the thread field.
Removed methods collectAllPermits(), flush(), run() and stop().
In shutdown(), used AtomicBoolean.compareAndSet().
ReplicationDB.java:
Renamed addEntries(List<UpdateMsg>) to addEntry(UpdateMsg).
JEReplicaDBTest.java:
Removed now unnecessary waitChangesArePersisted().
JEChangelogDB.java:
In shutdown(), enforced threads joining + called Thread.interrupt() to ensure shutdown. This prevents message about unclosed cursors in integrated unit tests.
ReplicationServer.java:
Removed getQueueSize().
JEChangeNumberIndexDB.java:
Removed unused oldestChangeNumber.
In shutdown(), used AtomicBoolean.compareAndSet() + removed useless call to notify().
JEChangeNumberIndexDBTest.java:
Fixed javadocs.
ChangeTimeHeartbeatMsg.java:
Implemented toString().