Skip to content

Commit

Permalink
Disallow setting queue in TransferQueueBundler constructor
Browse files Browse the repository at this point in the history
Because it doesn't work as it's overwritten in start
  • Loading branch information
belaban committed Jun 27, 2024
1 parent 2998591 commit 7c85505
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
5 changes: 0 additions & 5 deletions src/org/jgroups/protocols/SimplifiedTransferQueueBundler.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.jgroups.util.Util;

import java.util.Objects;
import java.util.concurrent.ArrayBlockingQueue;

/**
* This bundler uses the same logic as {@link TransferQueueBundler} but does not allocate
Expand All @@ -20,10 +19,6 @@ public class SimplifiedTransferQueueBundler extends TransferQueueBundler {
public SimplifiedTransferQueueBundler() {
}

public SimplifiedTransferQueueBundler(int capacity) {
super(new ArrayBlockingQueue<>(Util.assertPositive(capacity, "bundler capacity cannot be " + capacity)));
}

public int size() {
return curr + removeQueueSize();
}
Expand Down
9 changes: 0 additions & 9 deletions src/org/jgroups/protocols/TransferQueueBundler.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jgroups.protocols;


import org.jgroups.Message;
import org.jgroups.annotations.ManagedAttribute;
import org.jgroups.annotations.Property;
Expand Down Expand Up @@ -44,14 +43,6 @@ public class TransferQueueBundler extends BaseBundler implements Runnable {
public TransferQueueBundler() {
}

protected TransferQueueBundler(BlockingQueue<Message> queue) {
this.queue=queue;
}

public TransferQueueBundler(int capacity) {
this(new ArrayBlockingQueue<>(Util.assertPositive(capacity, "bundler capacity cannot be " + capacity)));
}

public Thread getThread() {return bundler_thread;}

@ManagedAttribute(description="Size of the queue")
Expand Down

0 comments on commit 7c85505

Please sign in to comment.