Removed unnecessary flush() commands
This commit is contained in:
parent
bf681688d0
commit
73de927bd5
@ -294,8 +294,7 @@ class RmiBridge {
|
|||||||
|
|
||||||
// System.err.println("Sending: " + invokeMethod.responseID);
|
// System.err.println("Sending: " + invokeMethod.responseID);
|
||||||
connection.send()
|
connection.send()
|
||||||
.TCP(invokeMethodResult)
|
.TCP(invokeMethodResult);
|
||||||
.flush();
|
|
||||||
|
|
||||||
// logger.error("{} sent data: {} with id ({})", connection, result, invokeMethod.responseID);
|
// logger.error("{} sent data: {} with id ({})", connection, result, invokeMethod.responseID);
|
||||||
}
|
}
|
||||||
|
@ -149,8 +149,7 @@ class RmiObjectLocalHandler extends RmiObjectHandler {
|
|||||||
Class<?> rmiImpl = serialization.getRmiImpl(registration.interfaceClass);
|
Class<?> rmiImpl = serialization.getRmiImpl(registration.interfaceClass);
|
||||||
|
|
||||||
RmiRegistration registrationResult = connection.createNewRmiObject(interfaceClass, rmiImpl, callbackId);
|
RmiRegistration registrationResult = connection.createNewRmiObject(interfaceClass, rmiImpl, callbackId);
|
||||||
connection.TCP(registrationResult)
|
connection.TCP(registrationResult);
|
||||||
.flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we are getting an already existing REMOTE object. This check is always AFTER the check to create a new object
|
// Check if we are getting an already existing REMOTE object. This check is always AFTER the check to create a new object
|
||||||
@ -160,8 +159,7 @@ class RmiObjectLocalHandler extends RmiObjectHandler {
|
|||||||
// GET a LOCAL rmi object, if none get a specific, GLOBAL rmi object (objects that are not bound to a single connection).
|
// GET a LOCAL rmi object, if none get a specific, GLOBAL rmi object (objects that are not bound to a single connection).
|
||||||
RmiRegistration registrationResult = connection.getExistingRmiObject(interfaceClass, registration.rmiId, callbackId);
|
RmiRegistration registrationResult = connection.getExistingRmiObject(interfaceClass, registration.rmiId, callbackId);
|
||||||
|
|
||||||
connection.TCP(registrationResult)
|
connection.TCP(registrationResult);
|
||||||
.flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -56,8 +56,7 @@ class RmiObjectNetworkHandler extends RmiObjectHandler {
|
|||||||
|
|
||||||
// For network connections, the interface class kryo ID == implementation class kryo ID, so they switch automatically.
|
// For network connections, the interface class kryo ID == implementation class kryo ID, so they switch automatically.
|
||||||
RmiRegistration registrationResult = connection.createNewRmiObject(interfaceClass, interfaceClass, callbackId);
|
RmiRegistration registrationResult = connection.createNewRmiObject(interfaceClass, interfaceClass, callbackId);
|
||||||
connection.TCP(registrationResult)
|
connection.TCP(registrationResult);
|
||||||
.flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we are getting an already existing REMOTE object. This check is always AFTER the check to create a new object
|
// Check if we are getting an already existing REMOTE object. This check is always AFTER the check to create a new object
|
||||||
@ -66,8 +65,7 @@ class RmiObjectNetworkHandler extends RmiObjectHandler {
|
|||||||
//
|
//
|
||||||
// GET a LOCAL rmi object, if none get a specific, GLOBAL rmi object (objects that are not bound to a single connection).
|
// GET a LOCAL rmi object, if none get a specific, GLOBAL rmi object (objects that are not bound to a single connection).
|
||||||
RmiRegistration registrationResult = connection.getExistingRmiObject(interfaceClass, registration.rmiId, callbackId);
|
RmiRegistration registrationResult = connection.getExistingRmiObject(interfaceClass, registration.rmiId, callbackId);
|
||||||
connection.TCP(registrationResult)
|
connection.TCP(registrationResult);
|
||||||
.flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -46,11 +46,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import dorkbox.network.connection.Connection;
|
import dorkbox.network.connection.*;
|
||||||
import dorkbox.network.connection.ConnectionImpl;
|
|
||||||
import dorkbox.network.connection.EndPoint;
|
|
||||||
import dorkbox.network.connection.KryoExtra;
|
|
||||||
import dorkbox.network.connection.Listener;
|
|
||||||
import dorkbox.network.serialization.RmiSerializationManager;
|
import dorkbox.network.serialization.RmiSerializationManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -279,14 +275,10 @@ class RmiProxyHandler implements InvocationHandler {
|
|||||||
|
|
||||||
// Sends our invokeMethod to the remote connection, which the RmiBridge listens for
|
// Sends our invokeMethod to the remote connection, which the RmiBridge listens for
|
||||||
if (this.udp) {
|
if (this.udp) {
|
||||||
this.connection.send()
|
this.connection.UDP(invokeMethod);
|
||||||
.UDP(invokeMethod)
|
|
||||||
.flush();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.connection.send()
|
this.connection.TCP(invokeMethod);
|
||||||
.TCP(invokeMethod)
|
|
||||||
.flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isTraceEnabled()) {
|
if (logger.isTraceEnabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user