aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-30 14:38:18 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2022-01-30 14:54:50 +0100
commit3cc97ab837ce8bd66627b5f186db8d307c98d902 (patch)
treee8c949b688e097da2a1dbca0eccb700c25d1eea4 /jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java
parent9d4a1d80b09d58a6a91257e45afdf6bb3315a7d3 (diff)
- Storing references instead of just counting them has been default for a while now, so making it default in code too.
- Remove option to do just do refcounting.
Diffstat (limited to 'jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java')
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java b/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java
index a131fc557c4..cabadafa8a0 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/AbstractResource.java
@@ -5,7 +5,6 @@ import com.yahoo.jdisc.handler.RequestHandler;
import com.yahoo.jdisc.refcount.DebugReferencesByContextMap;
import com.yahoo.jdisc.refcount.DebugReferencesWithStack;
import com.yahoo.jdisc.refcount.DestructableResource;
-import com.yahoo.jdisc.refcount.ReferencesByCount;
import com.yahoo.jdisc.service.ClientProvider;
import com.yahoo.jdisc.service.ServerProvider;
import com.yahoo.jdisc.refcount.References;
@@ -25,12 +24,10 @@ public abstract class AbstractResource implements SharedResource {
protected AbstractResource() {
DestructableResource destructable = new WrappedResource(this);
- if (debug == Debug.SIMPLE) {
- references = new DebugReferencesByContextMap(destructable, this);
- } else if (debug == Debug.STACK) {
+ if (debug == Debug.STACK) {
references = new DebugReferencesWithStack(destructable);
} else {
- references = new ReferencesByCount(destructable);
+ references = new DebugReferencesByContextMap(destructable, this);
}
}