Code Review
/
dmaap
/
messagerouter
/
dmaapclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix the code that determines when to publish batch
[dmaap/messagerouter/dmaapclient.git]
/
src
/
main
/
java
/
org
/
onap
/
dmaap
/
mr
/
client
/
impl
/
MRSimplerBatchPublisher.java
diff --git
a/src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java
b/src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java
index
d9076a4
..
8f2a66e
100644
(file)
--- a/
src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java
+++ b/
src/main/java/org/onap/dmaap/mr/client/impl/MRSimplerBatchPublisher.java
@@
-131,6
+131,7
@@
public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
private String fTransportype;
private String fTopic;
private int fMaxBatchSize = 100;
private String fTransportype;
private String fTopic;
private int fMaxBatchSize = 100;
+
private long fMaxBatchAgeMs = 1000;
private boolean fCompress = false;
private int threadOccuranceTime = 50;
private long fMaxBatchAgeMs = 1000;
private boolean fCompress = false;
private int threadOccuranceTime = 50;
@@
-233,7
+234,7
@@
public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
private synchronized boolean shouldSendNow() {
boolean shouldSend = false;
private synchronized boolean shouldSendNow() {
boolean shouldSend = false;
- if (fPending.
isEmpty()
) {
+ if (fPending.
size()>0
) {
final long nowMs = Clock.now();
shouldSend = (fPending.size() >= fMaxBatchSize);
final long nowMs = Clock.now();
shouldSend = (fPending.size() >= fMaxBatchSize);