mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject mnemonic git commit: MNEMONIC-389: ParameterHolder should contain reclaim context
Date Sat, 28 Apr 2018 18:36:59 GMT
Repository: mnemonic
Updated Branches:
  refs/heads/master bd3cd224d -> 9749f2a60


MNEMONIC-389: ParameterHolder should contain reclaim context


Project: http://git-wip-us.apache.org/repos/asf/mnemonic/repo
Commit: http://git-wip-us.apache.org/repos/asf/mnemonic/commit/9749f2a6
Tree: http://git-wip-us.apache.org/repos/asf/mnemonic/tree/9749f2a6
Diff: http://git-wip-us.apache.org/repos/asf/mnemonic/diff/9749f2a6

Branch: refs/heads/master
Commit: 9749f2a609a9e777f0db5e7209f5bbbed48bf3ce
Parents: bd3cd22
Author: Yanhui Zhao <yanhui.zhao@outlook.com>
Authored: Thu Apr 26 14:27:21 2018 -0700
Committer: Yanhui Zhao <yanhui.zhao@outlook.com>
Committed: Thu Apr 26 14:27:21 2018 -0700

----------------------------------------------------------------------
 .../org/apache/mnemonic/ParameterHolder.java    | 23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mnemonic/blob/9749f2a6/mnemonic-core/src/main/java/org/apache/mnemonic/ParameterHolder.java
----------------------------------------------------------------------
diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/ParameterHolder.java b/mnemonic-core/src/main/java/org/apache/mnemonic/ParameterHolder.java
index efc3baf..5ffff35 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/ParameterHolder.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/ParameterHolder.java
@@ -18,6 +18,7 @@
 package org.apache.mnemonic;
 
 import org.apache.commons.lang3.tuple.MutablePair;
+import org.flowcomputing.commons.resgc.ReclaimContext;
 
 public class ParameterHolder<A extends RetrievableAllocator<A>> {
 
@@ -25,6 +26,7 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
     private boolean autoReclaim;
     private long handler;
     private MutablePair<DurableType[], EntityFactoryProxy[]> dpt;
+    private ReclaimContext rctx;
 
 
     public ParameterHolder() {
@@ -32,6 +34,7 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
         this.autoReclaim = true;
         this.handler = 0;
         this.dpt = new MutablePair<DurableType[], EntityFactoryProxy[]>(new DurableType[]{},
null);
+        this.rctx = null;
     }
 
     public ParameterHolder(A n) {
@@ -39,6 +42,7 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
         this.autoReclaim = true;
         this.handler = 0;
         this.dpt = new MutablePair<DurableType[], EntityFactoryProxy[]>(new DurableType[]{},
null);
+        this.rctx = null;
     }
 
     public ParameterHolder(A n, DurableType[] d) {
@@ -46,6 +50,7 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
         this.autoReclaim = true;
         this.handler = 0;
         this.dpt = new MutablePair<DurableType[], EntityFactoryProxy[]>(d, null);
+        this.rctx = null;
     }
 
     public ParameterHolder(A n, DurableType[] d, EntityFactoryProxy[] e) {
@@ -53,6 +58,7 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
         this.autoReclaim = true;
         this.handler = 0;
         this.dpt = new MutablePair<DurableType[], EntityFactoryProxy[]>(d, e);
+        this.rctx = null;
     }
 
     public ParameterHolder(A n, DurableType[] d, EntityFactoryProxy[] e, boolean b, long
h) {
@@ -60,6 +66,15 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
         this.autoReclaim = b;
         this.handler = h;
         this.dpt = new MutablePair<DurableType[], EntityFactoryProxy[]>(d, e);
+        this.rctx = null;
+    }
+
+    public ParameterHolder(A n, DurableType[] d, EntityFactoryProxy[] e, boolean b, long
h, ReclaimContext rctx) {
+        this.allocator = n;
+        this.autoReclaim = b;
+        this.handler = h;
+        this.dpt = new MutablePair<DurableType[], EntityFactoryProxy[]>(d, e);
+        this.rctx = rctx;
     }
 
     public void setAllocator(A n) {
@@ -110,4 +125,12 @@ public class ParameterHolder<A extends RetrievableAllocator<A>>
{
     public MutablePair<DurableType[], EntityFactoryProxy[]> getGenericTypeAndEntityFactoryProxyPair()
{
         return dpt;
     }
+
+    public void setReclaimContext(ReclaimContext r) {
+        rctx = r;
+    }
+
+    public ReclaimContext getReclaimContext() {
+        return rctx;
+    }
 }


Mime
View raw message