Skip to content

Commit

Permalink
Remove Ice.ThreadInterruptSafe (#3334)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Jan 10, 2025
1 parent 93522af commit 8857b67
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 535 deletions.
1 change: 0 additions & 1 deletion config/PropertyNames.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@
<property name="Warn.Endpoints" languages="all" default="1" />
<property name="Warn.UnusedProperties" languages="all" default="0" />
<property name="CacheMessageBuffers" languages="csharp,java" default="2" />
<property name="ThreadInterruptSafe" languages="java" />
</section>

<section name="IceMX" opt-in="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ int invokeAsyncRequest(OutgoingAsyncBase outAsync, int batchRequestNum, boolean

if (!sync
|| !_response
|| _reference.getInstance().queueRequests()
|| _reference.getInvocationTimeout().compareTo(Duration.ZERO) > 0) {
_adapter.getThreadPool()
.dispatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package com.zeroc.Ice;

import java.util.concurrent.Callable;

class CommunicatorFlushBatch extends InvocationFuture<Void> {
public CommunicatorFlushBatch(Communicator communicator, Instance instance) {
super(communicator, instance, "flushBatchRequests");
Expand Down Expand Up @@ -74,26 +72,6 @@ protected com.zeroc.Ice.Instrumentation.InvocationObserver getObserver() {
con.getBatchRequestQueue().swap(flushBatch.getOs());
if (r == null) {
flushBatch.sent();
} else if (_instance.queueRequests()) {
_instance
.getQueueExecutor()
.executeNoThrow(
new Callable<Void>() {
@Override
public Void call() throws RetryException {
boolean comp = false;
if (compressBatch == CompressBatch.Yes) {
comp = true;
} else if (compressBatch == CompressBatch.No) {
comp = false;
} else {
comp = r.compress;
}
con.sendAsyncRequest(
flushBatch, comp, false, r.batchRequestNum);
return null;
}
});
} else {
boolean comp = false;
if (compressBatch == CompressBatch.Yes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package com.zeroc.Ice;

import java.util.concurrent.Callable;

final class ConnectRequestHandler
implements RequestHandler, Reference.GetConnectionCallback, RouterInfo.AddProxyCallback {
@Override
Expand Down Expand Up @@ -177,24 +175,6 @@ private boolean initialized() {
}

private void flushRequests() {
if (_reference.getInstance().queueRequests()) {
_reference
.getInstance()
.getQueueExecutor()
.executeNoThrow(
new Callable<Void>() {
@Override
public Void call() throws Exception {
flushRequestsImpl();
return null;
}
});
} else {
flushRequestsImpl();
}
}

private void flushRequestsImpl() {
synchronized (this) {
assert (_connection != null && !_initialized);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package com.zeroc.Ice;

import java.util.concurrent.Callable;

class ConnectionFlushBatch extends OutgoingAsyncBase<Void> {
public ConnectionFlushBatch(ConnectionI con, Communicator communicator, Instance instance) {
super(communicator, instance, "flushBatchRequests");
Expand All @@ -32,29 +30,6 @@ public void invoke(CompressBatch compressBatch) {
if (sent()) {
status |= AsyncStatus.InvokeSentCallback;
}
} else if (_instance.queueRequests()) {
status =
_instance
.getQueueExecutor()
.execute(
new Callable<Integer>() {
@Override
public Integer call() throws RetryException {
boolean comp = false;
if (compressBatch == CompressBatch.Yes) {
comp = true;
} else if (compressBatch == CompressBatch.No) {
comp = false;
} else {
comp = r.compress;
}
return _connection.sendAsyncRequest(
ConnectionFlushBatch.this,
comp,
false,
r.batchRequestNum);
}
});
} else {
boolean comp = false;
if (compressBatch == CompressBatch.Yes) {
Expand Down
Loading

0 comments on commit 8857b67

Please sign in to comment.