[RJ-Servi] Rename APool2NodeFactory to APool2NodeObjectFactory since
it does not implement NodeFactory/RServiNodeFactory
Change-Id: I71cc61797dff39d29bb29709da2fb3098c2079fc
diff --git a/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2.java b/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2.java
index d0c2633..c1ee7e9 100644
--- a/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2.java
+++ b/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2.java
@@ -80,7 +80,7 @@
private final String id;
- private final APool2NodeFactory factory;
+ private final APool2NodeObjectFactory factory;
private int clientAllocationRenewPeriodMillis;
@@ -89,7 +89,7 @@
private final Object stateLock= new Object();
- public APool2(final String id, final APool2NodeFactory factory, final PoolConfig config)
+ public APool2(final String id, final APool2NodeObjectFactory factory, final PoolConfig config)
throws RjInvalidConfigurationException {
super(factory, createAConfig(config));
this.id= id;
diff --git a/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2NodeFactory.java b/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2NodeObjectFactory.java
similarity index 95%
rename from servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2NodeFactory.java
rename to servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2NodeObjectFactory.java
index effa5be..ec57e7b 100644
--- a/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2NodeFactory.java
+++ b/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/APool2NodeObjectFactory.java
@@ -45,7 +45,7 @@
@NonNullByDefault
-public class APool2NodeFactory implements PooledObjectFactory<APool2NodeHandler> {
+public class APool2NodeObjectFactory implements PooledObjectFactory<APool2NodeHandler> {
private APool2 pool= nonNullLateInit();
@@ -69,7 +69,7 @@
private final ExecutorService executor;
- public APool2NodeFactory(final NodeFactory factory,
+ public APool2NodeObjectFactory(final NodeFactory factory,
final CopyOnWriteIdentityListSet<PoolListener> poolListeners,
final ExecutorService executor) {
this.nodeFactory= factory;
@@ -234,10 +234,10 @@
public void run() {
try {
try {
- APool2NodeFactory.this.nodeFactory.stopNode(poolObj);
+ APool2NodeObjectFactory.this.nodeFactory.stopNode(poolObj);
}
finally {
- for (final PoolListener listener : APool2NodeFactory.this.poolListeners) {
+ for (final PoolListener listener : APool2NodeObjectFactory.this.poolListeners) {
try {
listener.disposed(poolObj);
}
@@ -248,7 +248,7 @@
}
}
finally {
- APool2NodeFactory.this.nodes.remove(poolObj);
+ APool2NodeObjectFactory.this.nodes.remove(poolObj);
}
}
});
diff --git a/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/PoolManager.java b/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/PoolManager.java
index af0579c..8fc85da 100644
--- a/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/PoolManager.java
+++ b/servi/org.eclipse.statet.rj.servi/srcServiPool/org/eclipse/statet/internal/rj/servi/PoolManager.java
@@ -66,7 +66,7 @@
private final CopyOnWriteIdentityListSet<PoolListener> poolListeners= new CopyOnWriteIdentityListSet<>();
private @Nullable APool2 pool;
- private @Nullable APool2NodeFactory poolFactory;
+ private @Nullable APool2NodeObjectFactory poolObjectFactory;
private PoolConfig poolConfig;
private final Object resourceLock= new Object();
@@ -113,9 +113,9 @@
public synchronized void setConfig(final PoolConfig config) {
final var pool= this.pool;
if (pool != null && pool.isOpen()) {
- final var poolFactory= nonNullAssert(this.poolFactory);
+ final var poolObjectFactory= nonNullAssert(this.poolObjectFactory);
pool.setConfig(config);
- poolFactory.setMaxUsageCount(config.getMaxUsageCount());
+ poolObjectFactory.setMaxUsageCount(config.getMaxUsageCount());
}
this.poolConfig= config;
}
@@ -135,11 +135,11 @@
@Override
public synchronized void init() throws RjException {
- final var poolFactory= new APool2NodeFactory(
+ final var poolObjectFactory= new APool2NodeObjectFactory(
this.nodeFactories.get(0), this.poolListeners, this.executor );
- poolFactory.setMaxUsageCount(this.poolConfig.getMaxUsageCount());
- this.poolFactory= poolFactory;
- final var pool= new APool2(this.id, poolFactory, this.poolConfig) {
+ poolObjectFactory.setMaxUsageCount(this.poolConfig.getMaxUsageCount());
+ this.poolObjectFactory= poolObjectFactory;
+ final var pool= new APool2(this.id, poolObjectFactory, this.poolConfig) {
@Override
protected void closeFinally() {
super.closeFinally();
@@ -188,9 +188,9 @@
@Override
public Collection<? extends PoolNodeObject> getPoolNodeObjects() {
checkInitialized();
- final var poolFactory= nonNullAssert(this.poolFactory);
+ final var poolObjectFactory= nonNullAssert(this.poolObjectFactory);
- return poolFactory.getAllObjects();
+ return poolObjectFactory.getAllObjects();
}
public boolean isStopped() {
@@ -305,7 +305,7 @@
public RServiPoolManager.Counter getCounter() {
checkInitialized();
final var pool= nonNullAssert(this.pool);
- final var poolFactory= nonNullAssert(this.poolFactory);
+ final var poolObjectFactory= nonNullAssert(this.poolObjectFactory);
final RServiPoolManager.Counter counter= new RServiPoolManager.Counter();
synchronized (pool) {
@@ -313,8 +313,8 @@
counter.numInUse= pool.getNumActive();
counter.numTotal= counter.numIdling + counter.numTotal;
counter.maxIdling= -1;
- counter.maxInUse= poolFactory.getStatMaxAllocated();
- counter.maxTotal= poolFactory.getStatMaxTotal();
+ counter.maxInUse= poolObjectFactory.getStatMaxAllocated();
+ counter.maxTotal= poolObjectFactory.getStatMaxTotal();
}
return counter;
}