OPENDJ-885 (CR-1909) Replication replay may lose changes if it can't acquire a writeLock
The code replaying the replicated operations now handles BUSY and UNAVAILABLE result codes and will retry replaying these operations.
Prevented a possible OutOfMemoryError by bounding the queue holding the replicated operations.
LDAPReplicationDomain.java, ReplicationDomain.java:
In replay(), added the AtomicBoolean shutdown parameter + tested for server shutdown + handled BUSY and UNAVAILABLE result codes +
In processUpdate(), added the AtomicBoolean shutdown parameter + tested for server shutdown + ensured the code works with a bounded queue.
Extracted logDecodingOperationError() out of replay().
MultimasterReplication.java:
Made updateToReplayQueue a bounded queue (it was unbounded before).
ReplayThread.java, ListenerThread.java:
Converted shutdown boolean instance member into an AtomicBoolean.