Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaguilar2010-05-07 15:38:08 +0000
committerkaguilar2010-05-07 15:38:08 +0000
commit09acafa082d2ea056b3a999b5cc18fe245b62e07 (patch)
treecdbb27bb43b44feee0d2c3011011025c50c38da2 /plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse
parent3abf7c0c18d4dbd093d138a12aa5e658a4d93c51 (diff)
downloadorg.eclipse.osee-09acafa082d2ea056b3a999b5cc18fe245b62e07.tar.gz
org.eclipse.osee-09acafa082d2ea056b3a999b5cc18fe245b62e07.tar.xz
org.eclipse.osee-09acafa082d2ea056b3a999b5cc18fe245b62e07.zip
bumped the size of the datagram channel's internal receive buffer
Diffstat (limited to 'plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java2
-rw-r--r--plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java11
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java
index 289e01994dd..bc77b3ec7d3 100644
--- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java
+++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java
@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.logging.Level;
+
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.ote.client.msg.core.db.AbstractMessageDataBase;
import org.eclipse.osee.ote.client.msg.core.db.MessageInstance;
@@ -43,7 +44,6 @@ final public class ChannelProcessor {
*/
private final class Task implements Runnable {
private final ByteBuffer buffer;
- private final byte[] nameBuffer = new byte[128];
public Task(ByteBuffer buffer) {
this.buffer = buffer;
diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java
index 25b24ed084a..99e76339c2a 100644
--- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java
+++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java
@@ -20,6 +20,7 @@ import java.util.EnumMap;
import java.util.Iterator;
import java.util.Set;
import java.util.logging.Level;
+
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.ote.message.enums.MemType;
@@ -30,6 +31,11 @@ import org.eclipse.osee.ote.message.enums.MemType;
* @author Ken J. Aguilar
*/
public final class UpdateDispatcher {
+ /**
+ *
+ */
+ private static final int RECEIVE_BUFFER_SIZE = 1024 * 128;
+
/** * Class Instance Fields ** */
private final EnumMap<MemType, DatagramChannel> channelMap = new EnumMap<MemType, DatagramChannel>(MemType.class);
@@ -124,7 +130,10 @@ public final class UpdateDispatcher {
throws IOException {
final DatagramChannel channel = DatagramChannel.open();
channel.configureBlocking(false);
- channel.socket().bind(new InetSocketAddress(localAddress, port));
+ channel.socket().bind(new InetSocketAddress(localAddress, port));
+ if (channel.socket().getReceiveBufferSize() < RECEIVE_BUFFER_SIZE) {
+ channel.socket().setReceiveBufferSize(RECEIVE_BUFFER_SIZE);
+ }
channel.connect(remoteAddress);
if (channelMap.put(type, channel) != null) {
OseeLog.log(MessageSubscriptionService.class, Level.WARNING, "A previous channel was replaced");

Back to the top