Java Code Examples for org.apache.rocketmq.store.CommitLog#GroupCommitRequest
The following examples show how to use
org.apache.rocketmq.store.CommitLog#GroupCommitRequest .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HAService.java From rocketmq_trans_message with Apache License 2.0 | 6 votes |
private void doWaitTransfer() { synchronized (this.requestsRead) { if (!this.requestsRead.isEmpty()) { for (CommitLog.GroupCommitRequest req : this.requestsRead) { boolean transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset(); for (int i = 0; !transferOK && i < 5; i++) { this.notifyTransferObject.waitForRunning(1000); transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset(); } if (!transferOK) { log.warn("transfer messsage to slave timeout, " + req.getNextOffset()); } req.wakeupCustomer(transferOK); } this.requestsRead.clear(); } } }
Example 2
Source File: HAService.java From DDMQ with Apache License 2.0 | 6 votes |
private void doWaitTransfer() { synchronized (this.requestsRead) { if (!this.requestsRead.isEmpty()) { for (CommitLog.GroupCommitRequest req : this.requestsRead) { boolean transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset(); while (!transferOK && defaultMessageStore.getSystemClock().now() < req.getExpireTimestamp()) { this.notifyTransferObject.waitForRunning(1000); transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset(); } if (!transferOK) { log.warn("transfer message to slave timeout, " + req.getNextOffset()); } req.wakeupCustomer(transferOK); } this.requestsRead.clear(); } } }
Example 3
Source File: HAService.java From DDMQ with Apache License 2.0 | 6 votes |
private void doWaitTransfer() { synchronized (this.requestsRead) { if (!this.requestsRead.isEmpty()) { for (CommitLog.GroupCommitRequest req : this.requestsRead) { boolean transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset(); while (!transferOK && defaultMessageStore.getSystemClock().now() < req.getExpireTimestamp()) { this.notifyTransferObject.waitForRunning(1000); transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset(); } if (!transferOK) { log.warn("transfer message to slave timeout, " + req.getNextOffset()); } req.wakeupCustomer(transferOK); } this.requestsRead.clear(); } } }
Example 4
Source File: HAService.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
public synchronized void putRequest(final CommitLog.GroupCommitRequest request) { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); // notify } }
Example 5
Source File: HAService.java From DDMQ with Apache License 2.0 | 5 votes |
public synchronized void putRequest(final CommitLog.GroupCommitRequest request) { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); // notify } }
Example 6
Source File: HAService.java From rocketmq-read with Apache License 2.0 | 5 votes |
public synchronized void putRequest(final CommitLog.GroupCommitRequest request) { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); // notify } }
Example 7
Source File: HAService.java From rocketmq_trans_message with Apache License 2.0 | 5 votes |
public synchronized void putRequest(final CommitLog.GroupCommitRequest request) { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); // notify } }
Example 8
Source File: HAService.java From rocketmq with Apache License 2.0 | 5 votes |
public synchronized void putRequest(final CommitLog.GroupCommitRequest request) { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); // notify } }
Example 9
Source File: HAService.java From rocketmq with Apache License 2.0 | 4 votes |
private void swapRequests() { List<CommitLog.GroupCommitRequest> tmp = this.requestsWrite; this.requestsWrite = this.requestsRead; this.requestsRead = tmp; }
Example 10
Source File: HAService.java From DDMQ with Apache License 2.0 | 4 votes |
public void putRequest(final CommitLog.GroupCommitRequest request) { this.groupTransferService.putRequest(request); }
Example 11
Source File: HAService.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 4 votes |
public void putRequest(final CommitLog.GroupCommitRequest request) { this.groupTransferService.putRequest(request); }
Example 12
Source File: HAService.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 4 votes |
private void swapRequests() { List<CommitLog.GroupCommitRequest> tmp = this.requestsWrite; this.requestsWrite = this.requestsRead; this.requestsRead = tmp; }
Example 13
Source File: HAService.java From rocketmq with Apache License 2.0 | 4 votes |
public synchronized void putRequest(final CommitLog.GroupCommitRequest request) { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } this.wakeup(); }
Example 14
Source File: HAService.java From rocketmq with Apache License 2.0 | 4 votes |
private void swapRequests() { List<CommitLog.GroupCommitRequest> tmp = this.requestsWrite; this.requestsWrite = this.requestsRead; this.requestsRead = tmp; }
Example 15
Source File: HAService.java From rocketmq with Apache License 2.0 | 4 votes |
public void putRequest(final CommitLog.GroupCommitRequest request) { this.groupTransferService.putRequest(request); }
Example 16
Source File: HAService.java From rocketmq-read with Apache License 2.0 | 4 votes |
private void swapRequests() { List<CommitLog.GroupCommitRequest> tmp = this.requestsWrite; this.requestsWrite = this.requestsRead; this.requestsRead = tmp; }
Example 17
Source File: HAService.java From rocketmq-read with Apache License 2.0 | 4 votes |
public void putRequest(final CommitLog.GroupCommitRequest request) { this.groupTransferService.putRequest(request); }
Example 18
Source File: HAService.java From rocketmq_trans_message with Apache License 2.0 | 4 votes |
private void swapRequests() { List<CommitLog.GroupCommitRequest> tmp = this.requestsWrite; this.requestsWrite = this.requestsRead; this.requestsRead = tmp; }
Example 19
Source File: HAService.java From rocketmq_trans_message with Apache License 2.0 | 4 votes |
public void putRequest(final CommitLog.GroupCommitRequest request) { this.groupTransferService.putRequest(request); }
Example 20
Source File: HAService.java From rocketmq-4.3.0 with Apache License 2.0 | 4 votes |
public void putRequest(final CommitLog.GroupCommitRequest request) { this.groupTransferService.putRequest(request); }