| | |
| | | * @param sendToServerId |
| | | * serverId of the replica where changes will be sent |
| | | * @return The next update that must be sent to the consumer, or {@code null} when queue is empty |
| | | * @throws ChangelogException |
| | | * If a problem occurs when reading the changelog |
| | | */ |
| | | protected UpdateMsg getNextMessage(int sendToServerId) |
| | | protected UpdateMsg getNextMessage(int sendToServerId) throws ChangelogException |
| | | { |
| | | while (activeConsumer) |
| | | { |
| | |
| | | * Fills the late queue with the most recent changes, accepting only the |
| | | * messages from provided replica ids. |
| | | */ |
| | | private void fillLateQueue(int sendToServerId) |
| | | private void fillLateQueue(int sendToServerId) throws ChangelogException |
| | | { |
| | | try (DBCursor<UpdateMsg> cursor = replicationServerDomain.getCursorFrom(serverState);) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | catch (ChangelogException e) |
| | | { |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | | private boolean isLateQueueBelowThreshold() |