Commit c3171f08 authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Disable serialized object caching on both sides of the channel

parent 7d0336f3
......@@ -36,14 +36,6 @@ import alien.user.JAKeyStore;
*
*/
public class DispatchSSLClient {
/**
* Reset the object stream every this many objects sent
*/
private static final int RESET_OBJECT_STREAM_COUNTER = 1000;
private int objectsSentCounter = 0;
/**
* Logger
*/
......@@ -457,12 +449,7 @@ public class DispatchSSLClient {
final long lStart = System.currentTimeMillis();
c.oos.writeObject(r);
if (++c.objectsSentCounter >= RESET_OBJECT_STREAM_COUNTER) {
c.oos.reset();
c.objectsSentCounter = 0;
}
c.oos.writeUnshared(r);
c.oos.flush();
......
......@@ -54,12 +54,6 @@ import utils.CachedThreadPool;
*
*/
public class DispatchSSLServer extends Thread {
/**
* Reset the object stream every this many objects sent
*/
private static final int RESET_OBJECT_STREAM_COUNTER = 10;
/**
* Logger
*/
......@@ -94,8 +88,6 @@ public class DispatchSSLServer extends Thread {
private static boolean forwardRequest = false;
private int objectsSentCounter = 0;
private static AtomicInteger activeSessions = new AtomicInteger();
private static final CachedThreadPool acceptorPool = new CachedThreadPool(ConfigUtils.getConfig().geti("alien.api.DispatchSSLServer.maxAcceptorThreads", 16), 10, TimeUnit.SECONDS,
......@@ -246,11 +238,6 @@ public class DispatchSSLServer extends Thread {
oos.writeObject(r);
if (++objectsSentCounter >= RESET_OBJECT_STREAM_COUNTER) {
oos.reset();
objectsSentCounter = 0;
}
oos.flush();
serializationTime = timing.getMillis();
......
......@@ -57,12 +57,6 @@ import utils.CachedThreadPool;
*
*/
public class DispatchSSLServerNIO implements Runnable {
/**
* Reset the object stream every this many objects sent
*/
private static final int RESET_OBJECT_STREAM_COUNTER = 10;
/**
* Logger
*/
......@@ -147,8 +141,6 @@ public class DispatchSSLServerNIO implements Runnable {
*/
private ObjectOutputStream oos;
private int objectsSentCounter = 0;
private OutputStream os;
private X509Certificate partnerCerts[] = null;
......@@ -401,12 +393,7 @@ public class DispatchSSLServerNIO implements Runnable {
try (Timing timing = new Timing()) {
// System.err.println("When returning the object, ex is "+r.getException());
oos.writeObject(r);
if (++objectsSentCounter >= RESET_OBJECT_STREAM_COUNTER) {
oos.reset();
objectsSentCounter = 0;
}
oos.writeUnshared(r);
oos.flush();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment