Skip to content

Commit

Permalink
Merge pull request wso2#2116 from malakaganga/add_separate_worker_poo…
Browse files Browse the repository at this point in the history
…l_183

Fix review comments
  • Loading branch information
malakaganga authored Jun 1, 2023
2 parents cc0adfd + bc5b3af commit 424de2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ public void responseReceived(NHttpClientConnection conn) {
return;
}
if (targetResponse.isForceShutdownConnectionOnComplete() && conf.isConsumeAndDiscard()) {
ClientWorker clientWorker = new ClientWorker(targetConfiguration, requestMsgContext, targetResponse,
allowedResponseProperties);
ClientWorker clientWorker = new ClientWorker(targetConfiguration, requestMsgContext, targetResponse);
targetConfiguration.getSecondaryWorkerPool().execute(new MessageDiscardWorker(requestMsgContext,
targetResponse, targetConfiguration, clientWorker, conn));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ public int getWorkerPoolCoreSize() {
DEFAULT_WORKER_POOL_SIZE_CORE);
}
public int getSecondaryWorkerPoolCoreSize() {
return ConfigurationBuilderUtil.getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_POOL_SIZE_CORE,
DEFAULT_WORKER_POOL_SIZE_CORE, props);
return getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_POOL_SIZE_CORE,
DEFAULT_WORKER_POOL_SIZE_CORE);
}

public int getWorkerPoolMaxSize() {
return getIntProperty(PassThroughConfigPNames.WORKER_POOL_SIZE_MAX,
DEFAULT_WORKER_POOL_SIZE_MAX);
}
public int getSecondaryWorkerPoolMaxSize() {
return ConfigurationBuilderUtil.getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_POOL_SIZE_MAX,
DEFAULT_WORKER_POOL_SIZE_MAX, props);
return getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_POOL_SIZE_MAX,
DEFAULT_WORKER_POOL_SIZE_MAX);
}

public int getWorkerThreadKeepaliveSec() {
Expand All @@ -109,8 +109,8 @@ public int getWorkerThreadKeepaliveSec() {
}

public int getSecondaryWorkerThreadKeepaliveSec() {
return ConfigurationBuilderUtil.getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_THREAD_KEEPALIVE_SEC,
DEFAULT_WORKER_THREAD_KEEPALIVE_SEC, props);
return getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_THREAD_KEEPALIVE_SEC,
DEFAULT_WORKER_THREAD_KEEPALIVE_SEC);
}

public int getWorkerPoolQueueLen() {
Expand All @@ -119,8 +119,8 @@ public int getWorkerPoolQueueLen() {
}

public int getSecondaryWorkerPoolQueueLen() {
return ConfigurationBuilderUtil.getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_POOL_QUEUE_LENGTH,
DEFAULT_WORKER_POOL_QUEUE_LENGTH, props);
return getIntProperty(PassThroughConfigPNames.SECONDARY_WORKER_POOL_QUEUE_LENGTH,
DEFAULT_WORKER_POOL_QUEUE_LENGTH);
}

public int getIOThreadsPerReactor() {
Expand Down

0 comments on commit 424de2c

Please sign in to comment.