http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
 
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
deleted file mode 100644
index b93af84..0000000
--- 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.computingservice;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.mnemonic.NonVolatileMemAllocator;
-import org.apache.mnemonic.RestorableAllocator;
-import org.apache.mnemonic.Durable;
-import org.apache.mnemonic.EntityFactoryProxy;
-import org.apache.mnemonic.Utils;
-import org.apache.mnemonic.DurableType;
-import org.apache.mnemonic.collections.DurableSinglyLinkedList;
-import org.apache.mnemonic.collections.DurableSinglyLinkedListFactory;
-import org.apache.mnemonic.ParameterHolder;
-
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * A Test case suit, verify and demo the durable native computing services 
(DNCS) infra.
- *
- */
-
-public class DurableSinglyLinkedListNGPrintTest {
-  public static String uri = "./pobj_NodeValue_print.dat";
-  private long cKEYCAPACITY;
-  private Random m_rand;
-  private NonVolatileMemAllocator m_act;
-
-  @BeforeClass
-  public void setUp() throws IOException {
-    m_rand = Utils.createRandom();
-    Files.deleteIfExists(Paths.get(uri));
-    m_act = new 
NonVolatileMemAllocator(Utils.getNonVolatileMemoryAllocatorService("pmalloc"), 
1024 * 1024 * 1024,
-        uri, true);
-    cKEYCAPACITY = m_act.handlerCapacity();
-    for (long i = 0; i < cKEYCAPACITY; ++i) {
-      m_act.setHandler(i, 0L);
-    }
-  }
-
-  @AfterClass
-  public void tearDown() {
-    m_act.close();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test(enabled = true)
-  public void testDurableSinglyLinkedListWithPerson() {
-
-    int elem_count = 10;
-
-    DurableType listgftypes[] = {DurableType.DURABLE};
-    EntityFactoryProxy listefproxies[] = {new EntityFactoryProxy() {
-      @Override
-      public <A extends RestorableAllocator<A>> Durable restore(A allocator, 
EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, long phandler, boolean autoreclaim) {
-        return PersonFactory.restore(allocator, factoryproxys, gfields, 
phandler, autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
restore(ParameterHolder<A> ph) {
-        return PersonFactory.restore(ph.getAllocator(),
-                ph.getEntityFactoryProxies(), ph.getGenericTypes(), 
ph.getHandler(), ph.getAutoReclaim());
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable create(
-          A allocator, EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, boolean autoreclaim) {
-        return PersonFactory.create(allocator, factoryproxys, gfields, 
autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
create(ParameterHolder<A> ph) {
-        return PersonFactory.create(ph.getAllocator(),
-                ph.getEntityFactoryProxies(), ph.getGenericTypes(), 
ph.getAutoReclaim());
-      }
-    } };
-
-    DurableSinglyLinkedList<Person<Long>> firstnv = 
DurableSinglyLinkedListFactory.create(m_act, listefproxies, 
-        listgftypes, false);
-
-    DurableSinglyLinkedList<Person<Long>> nextnv = firstnv;
-
-    Person<Long> person = null;
-    long val;
-    DurableSinglyLinkedList<Person<Long>> newnv;
-    for (int i = 0; i < elem_count; ++i) {
-      person = (Person<Long>) listefproxies[0].create(m_act, null, null, 
false);
-      person.setAge((short) m_rand.nextInt(50));
-      person.setName(String.format("Name: [%s]", Utils.genRandomString()), 
true);
-      nextnv.setItem(person, false);
-      if (i + 1 == elem_count) {
-        break;
-      }
-      newnv = DurableSinglyLinkedListFactory.create(m_act, listefproxies, 
listgftypes, false);
-      nextnv.setNext(newnv, false);
-      nextnv = newnv;
-    }
-
-    Person<Long> eval;
-    DurableSinglyLinkedList<Person<Long>> iternv = firstnv;
-    System.out.printf(" -- Stage 1 Generated---\n");
-    while (null != iternv) {
-      eval = iternv.getItem();
-      if (null != eval) {
-        eval.testOutputAge();
-      }
-      iternv = iternv.getNext();
-    }
-    System.out.printf("\n");
-
-    long handler = firstnv.getHandler();
-
-    DurableSinglyLinkedList<Person<Long>> firstnv2 = 
DurableSinglyLinkedListFactory.restore(m_act, listefproxies, 
-        listgftypes, handler, false);
-
-    System.out.printf("--- Stage 2 Restored--- \n");
-    for (Person<Long> eval2 : firstnv2) {
-      if (null != eval2) {
-        eval2.testOutputAge();
-      }
-    }
-    System.out.printf("\n");
-
-    GeneralComputingService gcsvr = Utils.getGeneralComputingService("print");
-    ValueInfo vinfo = new ValueInfo();
-    List<long[][]> objstack = new ArrayList<long[][]>();
-    objstack.add(firstnv.getNativeFieldInfo());
-    objstack.add(person.getNativeFieldInfo());
-    long[][] fidinfostack = {{2L, 1L}, {0L, 1L}};
-    vinfo.handler = handler;
-    vinfo.transtable = m_act.getTranslateTable();
-    vinfo.dtype = DurableType.SHORT;
-    vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
-    ValueInfo[] vinfos = {vinfo};
-    gcsvr.perform(null, vinfos);
-
-  }
-
-  @Test(enabled = true)
-  public void testDurableSinglyLinkedListValue() {
-
-    int elem_count = 10;
-    long slotKeyId = 10;
-
-    DurableType[] elem_gftypes = {DurableType.DOUBLE};
-    EntityFactoryProxy[] elem_efproxies = null;
-
-    DurableType linkedgftypes[] = {DurableType.DURABLE, DurableType.DOUBLE};
-    EntityFactoryProxy linkedefproxies[] = {new EntityFactoryProxy() {
-      @Override
-      public <A extends RestorableAllocator<A>> Durable restore(A allocator, 
EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, long phandler, boolean autoreclaim) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(gfields, factoryproxys, 1);
-        return DurableSinglyLinkedListFactory.restore(allocator, 
dpt.getRight(), dpt.getLeft(), phandler, autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
restore(ParameterHolder<A> ph) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(ph.getGenericTypes(),
-                ph.getEntityFactoryProxies(), 1);
-        return DurableSinglyLinkedListFactory.restore(ph.getAllocator(),
-                dpt.getRight(), dpt.getLeft(), ph.getHandler(), 
ph.getAutoReclaim());
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable create(A allocator, 
EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, boolean autoreclaim) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(gfields, factoryproxys, 1);
-        return DurableSinglyLinkedListFactory.create(allocator, 
dpt.getRight(), dpt.getLeft(), autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
create(ParameterHolder<A> ph) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(ph.getGenericTypes(),
-                ph.getEntityFactoryProxies(), 1);
-        return DurableSinglyLinkedListFactory.create(ph.getAllocator(),
-                dpt.getRight(), dpt.getLeft(), ph.getAutoReclaim());
-      }
-    } };
-
-    DurableSinglyLinkedList<DurableSinglyLinkedList<Double>> nextnv = null, 
pre_nextnv = null;
-    DurableSinglyLinkedList<Double> elem = null, pre_elem = null, first_elem = 
null;
-
-    Long linkhandler = 0L;
-
-    System.out.printf(" --- Stage 1 Generated --- \n");
-
-    pre_nextnv = null;
-    Double val;
-    for (int i = 0; i < elem_count; ++i) {
-      first_elem = null;
-      pre_elem = null;
-      for (int v = 0; v < 3; ++v) {
-        elem = DurableSinglyLinkedListFactory.create(m_act, elem_efproxies, 
elem_gftypes, false);
-        val = m_rand.nextDouble();
-        elem.setItem(val, false);
-        if (null == pre_elem) {
-          first_elem = elem;
-        } else {
-          pre_elem.setNext(elem, false);
-        }
-        pre_elem = elem;
-        System.out.printf("%f ", val);
-      }
-
-      nextnv = DurableSinglyLinkedListFactory.create(m_act, linkedefproxies, 
linkedgftypes, false);
-      nextnv.setItem(first_elem, false);
-      if (null == pre_nextnv) {
-        linkhandler = nextnv.getHandler();
-      } else {
-        pre_nextnv.setNext(nextnv, false);
-      }
-      pre_nextnv = nextnv;
-      System.out.printf(" generated an item... \n");
-    }
-    m_act.setHandler(slotKeyId, linkhandler);
-
-    long handler = m_act.getHandler(slotKeyId);
-
-    DurableSinglyLinkedList<DurableSinglyLinkedList<Double>> linkedvals = 
DurableSinglyLinkedListFactory.restore(m_act,
-        linkedefproxies, linkedgftypes, handler, false);
-    Iterator<DurableSinglyLinkedList<Double>> iter = linkedvals.iterator();
-    Iterator<Double> elemiter = null;
-
-    System.out.printf(" --- Stage 2 Restored --- \n");
-    while (iter.hasNext()) {
-      elemiter = iter.next().iterator();
-      while (elemiter.hasNext()) {
-        System.out.printf("%f ", elemiter.next());
-      }
-      System.out.printf(" Fetched an item... \n");
-    }
-
-    GeneralComputingService gcsvr = Utils.getGeneralComputingService("print");
-    ValueInfo vinfo = new ValueInfo();
-    List<long[][]> objstack = new ArrayList<long[][]>();
-    objstack.add(linkedvals.getNativeFieldInfo());
-    objstack.add(linkedvals.getNativeFieldInfo());
-    long[][] fidinfostack = {{2L, 1L}, {2L, 1L}};
-    vinfo.handler = handler;
-    vinfo.transtable = m_act.getTranslateTable();
-    vinfo.dtype = DurableType.DOUBLE;
-    vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
-    ValueInfo[] vinfos = {vinfo};
-    gcsvr.perform(null, vinfos);
-
-    // Assert.assert, expected);(plist, plist2);
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
 
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
deleted file mode 100644
index 90287b0..0000000
--- 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.computingservice;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.mnemonic.NonVolatileMemAllocator;
-import org.apache.mnemonic.RestorableAllocator;
-import org.apache.mnemonic.Durable;
-import org.apache.mnemonic.EntityFactoryProxy;
-import org.apache.mnemonic.Utils;
-import org.apache.mnemonic.DurableType;
-import org.apache.mnemonic.ParameterHolder;
-import org.apache.mnemonic.collections.DurableSinglyLinkedList;
-import org.apache.mnemonic.collections.DurableSinglyLinkedListFactory;
-
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
-/**
- * A Test case suit, verify and demo the durable native computing services 
(DNCS) infra.
- *
- */
-
-public class DurableSinglyLinkedListNGSortTest {
-  public static String uri = "./pobj_NodeValue_sorting.dat";
-  private long cKEYCAPACITY;
-  private Random m_rand;
-  private NonVolatileMemAllocator m_act;
-
-  @BeforeClass
-  public void setUp() throws IOException {
-    m_rand = Utils.createRandom();
-    Files.deleteIfExists(Paths.get(uri));
-    m_act = new 
NonVolatileMemAllocator(Utils.getNonVolatileMemoryAllocatorService("pmalloc"), 
1024 * 1024 * 1024,
-        uri, true);
-    cKEYCAPACITY = m_act.handlerCapacity();
-    for (long i = 0; i < cKEYCAPACITY; ++i) {
-      m_act.setHandler(i, 0L);
-    }
-  }
-
-  @AfterClass
-  public void tearDown() {
-    m_act.close();
-  }
-
-  @SuppressWarnings("unchecked")
-  @Test(enabled = true)
-  public void testDurableSinglyLinkedListWithPerson() {
-
-    int elem_count = 20;
-
-    DurableType listgftypes[] = {DurableType.DURABLE};
-    EntityFactoryProxy listefproxies[] = {new EntityFactoryProxy() {
-      @Override
-      public <A extends RestorableAllocator<A>> Durable restore(A allocator, 
EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, long phandler, boolean autoreclaim) {
-        return PersonFactory.restore(allocator, factoryproxys, gfields, 
phandler, autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
restore(ParameterHolder<A> ph) {
-        return PersonFactory.restore(ph.getAllocator(),
-                ph.getEntityFactoryProxies(), ph.getGenericTypes(), 
ph.getHandler(), ph.getAutoReclaim());
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable create(
-          A allocator, EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, boolean autoreclaim) {
-        return PersonFactory.create(allocator, factoryproxys, gfields, 
autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
create(ParameterHolder<A> ph) {
-        return PersonFactory.create(ph.getAllocator(),
-                ph.getEntityFactoryProxies(), ph.getGenericTypes(), 
ph.getAutoReclaim());
-      }
-    } };
-
-    DurableSinglyLinkedList<Person<Long>> firstnv = 
DurableSinglyLinkedListFactory.create(m_act, listefproxies, 
-        listgftypes, false);
-
-    DurableSinglyLinkedList<Person<Long>> nextnv = firstnv;
-
-    Person<Long> person = null;
-    long val;
-    DurableSinglyLinkedList<Person<Long>> newnv;
-    for (int i = 0; i < elem_count; ++i) {
-      person = (Person<Long>) listefproxies[0].create(m_act, null, null, 
false);
-      person.setAge((short) m_rand.nextInt(50));
-      person.setName(String.format("Name: [%s]", Utils.genRandomString()), 
true);
-      nextnv.setItem(person, false);
-      if (i + 1 == elem_count) {
-        break;
-      }
-      newnv = DurableSinglyLinkedListFactory.create(m_act, listefproxies, 
listgftypes, false);
-      nextnv.setNext(newnv, false);
-      nextnv = newnv;
-    }
-
-    Person<Long> eval;
-    DurableSinglyLinkedList<Person<Long>> iternv = firstnv;
-    System.out.printf(" --- Stage 1 Generated---\n");
-    long agesum1 = 0L;
-    while (null != iternv) {
-      eval = iternv.getItem();
-      Assert.assertNotNull(eval);
-      eval.testOutputAge();
-      agesum1 += eval.getAge();
-      iternv = iternv.getNext();
-    }
-    System.out.printf("\n");
-
-    long handler = firstnv.getHandler();
-
-    DurableSinglyLinkedList<Person<Long>> firstnv2 = 
DurableSinglyLinkedListFactory.restore(m_act, listefproxies, 
-        listgftypes, handler, false);
-
-    System.out.printf("--- Stage 2 Restored--- \n");
-    long agesum2 = 0L;
-    for (Person<Long> eval2 : firstnv2) {
-      Assert.assertNotNull(eval2);
-      eval2.testOutputAge();
-      agesum2 += eval2.getAge();
-    }
-    System.out.printf("\n");
-    Assert.assertEquals(agesum1, agesum2);
-
-    GeneralComputingService gcsvr = Utils.getGeneralComputingService("sort");
-    ValueInfo vinfo = new ValueInfo();
-    List<long[][]> objstack = new ArrayList<long[][]>();
-    objstack.add(firstnv.getNativeFieldInfo());
-    objstack.add(person.getNativeFieldInfo());
-    long[][] fidinfostack = {{2L, 1L}, {0L, 1L}};
-    vinfo.handler = handler;
-    vinfo.transtable = m_act.getTranslateTable();
-    vinfo.dtype = DurableType.SHORT;
-    vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
-    ValueInfo[] vinfos = {vinfo};
-    long[] ret = gcsvr.perform("tensor_bubble", vinfos);
-
-    Assert.assertEquals(1, ret.length);
-    long handler2 = ret[0];
-    Assert.assertNotEquals(0L, handler2);
-
-    DurableSinglyLinkedList<Person<Long>> firstnv3 = 
DurableSinglyLinkedListFactory.restore(m_act, listefproxies, 
-        listgftypes, handler2, false);
-
-    System.out.printf("--- Stage 3 Sorted--- \n");
-    long agesum3 = 0L;
-    int preage = -1;
-    for (Person<Long> eval3 : firstnv3) {
-      Assert.assertNotNull(eval3);
-      eval3.testOutputAge();
-      agesum3 += eval3.getAge();
-      if (preage >= 0) {
-        Assert.assertTrue(eval3.getAge() >= preage);
-      }
-      preage = eval3.getAge();
-    }
-    System.out.printf("\n");
-    Assert.assertEquals(agesum2, agesum3);
-  }
-
-  @Test(enabled = true)
-  public void testDurableSinglyLinkedListValue() {
-
-    int elem_count = 20;
-    long slotKeyId = 10;
-
-    DurableType[] elem_gftypes = {DurableType.DOUBLE};
-    EntityFactoryProxy[] elem_efproxies = null;
-
-    DurableType linkedgftypes[] = {DurableType.DURABLE, DurableType.DOUBLE};
-    EntityFactoryProxy linkedefproxies[] = {new EntityFactoryProxy() {
-      @Override
-      public <A extends RestorableAllocator<A>> Durable restore(A allocator, 
EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, long phandler, boolean autoreclaim) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(gfields, factoryproxys, 1);
-        return DurableSinglyLinkedListFactory.restore(allocator, 
dpt.getRight(), dpt.getLeft(), phandler, autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
restore(ParameterHolder<A> ph) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(ph.getGenericTypes(),
-                ph.getEntityFactoryProxies(), 1);
-        return DurableSinglyLinkedListFactory.restore(ph.getAllocator(),
-                dpt.getRight(), dpt.getLeft(), ph.getHandler(), 
ph.getAutoReclaim());
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable create(A allocator, 
EntityFactoryProxy[] factoryproxys,
-          DurableType[] gfields, boolean autoreclaim) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(gfields, factoryproxys, 1);
-        return DurableSinglyLinkedListFactory.create(allocator, 
dpt.getRight(), dpt.getLeft(), autoreclaim);
-      }
-      @Override
-      public <A extends RestorableAllocator<A>> Durable 
create(ParameterHolder<A> ph) {
-        Pair<DurableType[], EntityFactoryProxy[]> dpt = 
Utils.shiftDurableParams(ph.getGenericTypes(),
-                ph.getEntityFactoryProxies(), 1);
-        return DurableSinglyLinkedListFactory.create(ph.getAllocator(),
-                dpt.getRight(), dpt.getLeft(), ph.getAutoReclaim());
-      }
-    } };
-
-    DurableSinglyLinkedList<DurableSinglyLinkedList<Double>> nextnv = null, 
pre_nextnv = null;
-    DurableSinglyLinkedList<Double> elem = null, pre_elem = null, first_elem = 
null;
-
-    Long linkhandler = 0L;
-
-    System.out.printf(" --- Stage 1 Generated --- \n");
-
-    pre_nextnv = null;
-    Double val;
-    double valsum1 = 0.0;
-    for (int i = 0; i < elem_count; ++i) {
-      first_elem = null;
-      pre_elem = null;
-      for (int v = 0; v < 12; ++v) {
-        elem = DurableSinglyLinkedListFactory.create(m_act, elem_efproxies, 
elem_gftypes, false);
-        val = m_rand.nextDouble();
-        elem.setItem(val, false);
-        if (null == pre_elem) {
-          first_elem = elem;
-        } else {
-          pre_elem.setNext(elem, false);
-        }
-        pre_elem = elem;
-        System.out.printf("%f ", val);
-        valsum1 += val;
-      }
-
-      nextnv = DurableSinglyLinkedListFactory.create(m_act, linkedefproxies, 
linkedgftypes, false);
-      nextnv.setItem(first_elem, false);
-      if (null == pre_nextnv) {
-        linkhandler = nextnv.getHandler();
-      } else {
-        pre_nextnv.setNext(nextnv, false);
-      }
-      pre_nextnv = nextnv;
-      System.out.printf(" generated an item... \n");
-    }
-    m_act.setHandler(slotKeyId, linkhandler);
-
-    long handler = m_act.getHandler(slotKeyId);
-
-    DurableSinglyLinkedList<DurableSinglyLinkedList<Double>> linkedvals = 
DurableSinglyLinkedListFactory.restore(m_act,
-        linkedefproxies, linkedgftypes, handler, false);
-    Iterator<DurableSinglyLinkedList<Double>> iter = linkedvals.iterator();
-    Iterator<Double> elemiter = null;
-
-    System.out.printf(" --- Stage 2 Restored --- \n");
-    double val2, valsum2 = 0.0;
-    while (iter.hasNext()) {
-      elemiter = iter.next().iterator();
-      while (elemiter.hasNext()) {
-        val2 = elemiter.next();
-        System.out.printf("%f ", val2);
-        valsum2 += val2;
-      }
-      System.out.printf(" Fetched an item... \n");
-    }
-    Assert.assertEquals(valsum1, valsum2, 0.0001);
-
-    GeneralComputingService gcsvr = Utils.getGeneralComputingService("sort");
-    ValueInfo vinfo = new ValueInfo();
-    List<long[][]> objstack = new ArrayList<long[][]>();
-    objstack.add(linkedvals.getNativeFieldInfo());
-    objstack.add(linkedvals.getNativeFieldInfo());
-    long[][] fidinfostack = {{2L, 1L}, {2L, 1L}};
-    vinfo.handler = handler;
-    vinfo.transtable = m_act.getTranslateTable();
-    vinfo.dtype = DurableType.DOUBLE;
-    vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
-    ValueInfo[] vinfos = {vinfo};
-    gcsvr.perform("tensor_bubble", vinfos);
-
-    // Assert.assert, expected);(plist, plist2);
-    DurableSinglyLinkedList<DurableSinglyLinkedList<Double>> linkedvals3 = 
DurableSinglyLinkedListFactory.restore(m_act,
-        linkedefproxies, linkedgftypes, handler, false);
-    Iterator<DurableSinglyLinkedList<Double>> iter3 = linkedvals3.iterator();
-    Iterator<Double> elemiter3 = null;
-
-    System.out.printf(" --- Stage 3 Sorted --- \n");
-    double val3, valsum3 = 0.0, preval3;
-    while (iter3.hasNext()) {
-      elemiter3 = iter3.next().iterator();
-      preval3 = 0.0;
-      while (elemiter3.hasNext()) {
-        val3 = elemiter3.next();
-        System.out.printf("%f ", val3);
-        valsum3 += val3;
-        if (preval3 != 0.0) {
-          Assert.assertTrue(val3 >= preval3);
-        }
-        preval3 = val3;
-      }
-      System.out.printf(" Fetched an item... \n");
-    }
-    Assert.assertEquals(valsum2, valsum3, 0.0001);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/Person.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/Person.java
 
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/Person.java
deleted file mode 100644
index 663ef68..0000000
--- 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/Person.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.computingservice;
-
-import org.apache.mnemonic.Durable;
-import org.apache.mnemonic.EntityFactoryProxy;
-import org.apache.mnemonic.DurableEntity;
-import org.apache.mnemonic.DurableGetter;
-import org.apache.mnemonic.DurableSetter;
-import org.apache.mnemonic.OutOfHybridMemory;
-import org.apache.mnemonic.RetrieveDurableEntityError;
-import org.apache.mnemonic.DurableType;
-import org.testng.annotations.Test;
-
-/**
- * A simple generic object used for testing and demo.
- *
- */
-
-@DurableEntity
-public abstract class Person<E> implements Durable, Comparable<Person<E>> {
-  E element;
-
-  @Override
-  public void initializeAfterCreate() {
-    System.out.println("Initializing After Created");
-  }
-
-  @Override
-  public void initializeAfterRestore() {
-    System.out.println("Initializing After Restored");
-  }
-
-  @Override
-  public void setupGenericInfo(EntityFactoryProxy[] efproxies, DurableType[] 
gftypes) {
-
-  }
-
-  @Test
-  public void testOutput() throws RetrieveDurableEntityError {
-    System.out.printf("Person %s, Age: %d ( %s ) \n", getName(), getAge(),
-        null == getMother() ? "No Recorded Mother" : "Has Recorded Mother");
-  }
-
-  public void testOutputAge() throws RetrieveDurableEntityError {
-    System.out.printf("(Person %s, Age: %d) ", getName(), getAge());
-  }
-
-  public int compareTo(Person<E> anotherPerson) {
-    int ret = 0;
-    if (0 == ret) {
-      ret = ((Short)getAge()).compareTo(anotherPerson.getAge());
-    }
-    if (0 == ret) {
-      ret = getName().compareTo(anotherPerson.getName());
-    }
-    return ret;
-  }
-
-  @DurableGetter(Id = 1L)
-  public abstract short getAge();
-
-  @DurableSetter
-  public abstract void setAge(short age);
-
-  @DurableGetter(Id = 2L)
-  public abstract String getName() throws RetrieveDurableEntityError;
-
-  @DurableSetter
-  public abstract void setName(String name, boolean destroy)
-      throws OutOfHybridMemory, RetrieveDurableEntityError;
-
-  @DurableGetter(Id = 3L)
-  public abstract Person<E> getMother() throws RetrieveDurableEntityError;
-
-  @DurableSetter
-  public abstract void setMother(Person<E> mother, boolean destroy) throws 
RetrieveDurableEntityError;
-
-  @DurableGetter(Id = 4L)
-  public abstract Person<E> getFather() throws RetrieveDurableEntityError;
-
-  @DurableSetter
-  public abstract void setFather(Person<E> mother, boolean destroy) throws 
RetrieveDurableEntityError;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-computing-services/mnemonic-utilities-service/src/test/resources/testng.xml
----------------------------------------------------------------------
diff --git 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/resources/testng.xml
 
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/resources/testng.xml
index 9ce4a4b..1839eaf 100644
--- 
a/mnemonic-computing-services/mnemonic-utilities-service/src/test/resources/testng.xml
+++ 
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/resources/testng.xml
@@ -23,12 +23,12 @@
 <suite name="Suite" verbose="1" parallel="tests" thread-count="1">
   <test name="Test">
     <classes>
-      <class 
name="org.apache.mnemonic.service.computingservice.DurableSinglyLinkedListNGPrintTest"/>
 
+      <class 
name="org.apache.mnemonic.service.computing.DurableSinglyLinkedListNGPrintTest"/>
     </classes>
   </test> <!-- Test -->
 </suite> <!-- Suite -->
 
 
 <!--
-      <class 
name="org.apache.mnemonic.service.computingservice.DurableSinglyLinkedListNGPrintTest"/>
 
+      <class 
name="org.apache.mnemonic.service.computing.DurableSinglyLinkedListNGPrintTest"/>
  -->

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java
index 81ecfa1..64a8e2c 100644
--- 
a/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java
@@ -17,8 +17,8 @@
 
 package org.apache.mnemonic;
 
-import org.apache.mnemonic.service.memoryservice.MemoryServiceFeature;
-import 
org.apache.mnemonic.service.memoryservice.NonVolatileMemoryAllocatorService;
+import org.apache.mnemonic.service.memory.MemoryServiceFeature;
+import org.apache.mnemonic.service.memory.NonVolatileMemoryAllocatorService;
 import org.flowcomputing.commons.resgc.ResCollector;
 import org.flowcomputing.commons.resgc.ResReclaim;
 

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
----------------------------------------------------------------------
diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
index d50c599..b1ed718 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/Utils.java
@@ -17,6 +17,13 @@
 
 package org.apache.mnemonic;
 
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.mnemonic.service.computing.GeneralComputingService;
+import org.apache.mnemonic.service.memory.NonVolatileMemoryAllocatorService;
+import org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService;
+import sun.misc.Unsafe;
+
 import java.io.File;
 import java.lang.reflect.Field;
 import java.nio.ByteBuffer;
@@ -24,18 +31,11 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
-import java.util.Random;
-import java.util.UUID;
-
-import sun.misc.Unsafe;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Random;
 import java.util.ServiceLoader;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.Pair;
-import 
org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService;
-import org.apache.mnemonic.service.computingservice.GeneralComputingService;
-import 
org.apache.mnemonic.service.memoryservice.NonVolatileMemoryAllocatorService;
+import java.util.UUID;
 
 /**
  * <p>

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java
index e4eaffa..20f64db 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/VolatileMemAllocator.java
@@ -17,8 +17,9 @@
 
 package org.apache.mnemonic;
 
-import org.apache.mnemonic.service.memoryservice.MemoryServiceFeature;
-import 
org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService;
+import org.apache.mnemonic.query.memory.Queryable;
+import org.apache.mnemonic.service.memory.MemoryServiceFeature;
+import org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService;
 import org.flowcomputing.commons.resgc.ResCollector;
 import org.flowcomputing.commons.resgc.ResReclaim;
 
@@ -537,4 +538,12 @@ public class VolatileMemAllocator extends 
RestorableAllocator<VolatileMemAllocat
   public boolean isInTransaction() {
     return m_vmasvc.isInTransaction();
   }
+
+  /**
+   *
+   * @return
+   */
+  Queryable useQuery() {
+    return null;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
new file mode 100644
index 0000000..c767604
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.query.memory;
+
+import org.apache.mnemonic.DurableType;
+
+public class AttributeInfo {
+
+  private String name;
+
+  private DurableType type;
+
+  private SortOrder sortOrder;
+
+  private long entityFieldId;
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public SortOrder getSortOrder() {
+    return sortOrder;
+  }
+
+  public void setSortOrder(SortOrder sortOrder) {
+    this.sortOrder = sortOrder;
+  }
+
+  public DurableType getType() {
+    return type;
+  }
+
+  public void setType(DurableType type) {
+    this.type = type;
+  }
+
+  public long getEntityFieldId() {
+    return entityFieldId;
+  }
+
+  public void setEntityFieldId(long entityFieldId) {
+    this.entityFieldId = entityFieldId;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java
new file mode 100644
index 0000000..5dabeb1
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.query.memory;
+
+public class EntityInfo {
+
+  private String className;
+
+  private String entityName;
+
+  private AttributeInfo[] attributeInfo;
+
+  public String getClassName() {
+    return className;
+  }
+
+  public void setClassName(String className) {
+    this.className = className;
+  }
+
+  public String getEntityName() {
+    return entityName;
+  }
+
+  public void setEntityName(String entityName) {
+    this.entityName = entityName;
+  }
+
+  public AttributeInfo[] getAttributeInfo() {
+    return attributeInfo;
+  }
+
+  public void setAttributeInfo(AttributeInfo[] attributeInfo) {
+    this.attributeInfo = attributeInfo;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/Queryable.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/Queryable.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/Queryable.java
new file mode 100644
index 0000000..ac7ea4d
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/Queryable.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.query.memory;
+
+import org.apache.mnemonic.service.computing.ValueInfo;
+
+/**
+ * Queryable interface for memory services
+ * It is optional for underlying services
+ *
+ */
+public interface Queryable {
+
+  /**
+   * Retrieve existing class names
+   *
+   * @return an array of class names
+   */
+  String[] getClassNames();
+
+  /**
+   * Retrieve existing entity names according to specified class name
+   *
+   * @param clsname
+   *          specify the class name
+   *
+   * @return an array of entity names
+   */
+  String[] getEntityNames(String clsname);
+
+  /**
+   * retrieve entity info
+   *
+   * @param clsname
+   *          specify a class name
+   *
+   * @param etyname
+   *          specify a entity name
+   *
+   * @return an entity info
+   */
+  EntityInfo getEntityInfo(String clsname, String etyname);
+
+  /**
+   * create an entity
+   *
+   * @param entityinfo
+   *          specify an entity info to create
+   */
+  void createEntity(EntityInfo entityinfo);
+
+  /**
+   * destroy an entity
+   *
+   * @param clsname
+   *          specify a class name
+   *
+   * @param etyname
+   *          specify an entity name
+   */
+  void destroyEntity(String clsname, String etyname);
+
+  /**
+   * update entity queryable info for a set of durable objects
+   *
+   * @param clsname
+   *          specify a class name
+   *
+   * @param etyname
+   *          specify an entity name
+   *
+   * @param updobjs
+   *          specify a set of durable objects for update
+   */
+  void updateQueryableInfo(String clsname, String etyname, ValueInfo updobjs);
+
+  /**
+   * delete a set of durable objects
+   *
+   * @param clsname
+   *          specify a class name
+   *
+   * @param etyname
+   *          specify an entity name
+   *
+   * @param updobjs
+   *          specify a set of durable objects to delete
+   */
+  void deleteQueryableInfo(String clsname, String etyname, ValueInfo updobjs);
+
+  /**
+   * do query using a querying string
+   *
+   * @param querystr
+   *          specify a query string
+   *
+   * @return a result set
+   */
+  ResultSet query(String querystr);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java
new file mode 100644
index 0000000..4194ca1
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.query.memory;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.util.Iterator;
+
+public class ResultSet implements Iterable<Long>, Closeable {
+
+  private Queryable m_queryable;
+
+  private long m_qid;
+
+  public ResultSet(Queryable queryable, long qid) {
+    m_queryable = queryable;
+    m_qid = qid;
+  }
+
+  @Override
+  public Iterator<Long> iterator() {
+    return null;
+  }
+
+  @Override
+  public void close() throws IOException {
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
new file mode 100644
index 0000000..114a881
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.query.memory;
+
+public enum SortOrder {
+
+  NONE(1),
+  ASCENDING(2),
+  DESCENDING(3);
+
+  private int value;
+
+  SortOrder(int val) {
+      this.value = val;
+    }
+
+  public int getValue() {
+      return value;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/GeneralComputingService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/GeneralComputingService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/GeneralComputingService.java
new file mode 100644
index 0000000..837250f
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/GeneralComputingService.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.mnemonic.service.computing;
+
+//import java.util.List;
+
+public interface GeneralComputingService {
+  /**
+   * Provide the service identifier for this allocator
+   *
+   * @return the service identifier of this allocator
+   */
+  String getServiceId();
+
+  /**
+   * prepare native parameter frames for native execution
+   *
+   * @param npfs
+   *         a list of frame of native parameter
+   */
+  // void setNativeParameterFrames(List<List<long[]>> npfs);
+
+  /**
+   * perform native functionalities according to prepared computing parameters
+   *
+   * @param mode
+   *         a selection mode of run instance
+   *
+   * @param valinfos
+   *         an array of value info
+   *
+   * @return the array of handler about updated object graphs if any
+   */
+  long[] perform(String mode, ValueInfo[] valinfos);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/ValueInfo.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/ValueInfo.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/ValueInfo.java
new file mode 100644
index 0000000..8ad6547
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computing/ValueInfo.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.mnemonic.service.computing;
+
+import org.apache.mnemonic.DurableType;
+
+public class ValueInfo {
+
+  /**
+   * a handler to a object graph
+   */
+  public long handler;
+  
+  /**
+   * a table for native address mapping
+   */
+  public long[][] transtable;
+  
+  /**
+   * a list of frame of native parameter
+   */
+  public long[][] frames;
+
+  /**
+   * a type of this specified value
+   */
+  public DurableType dtype;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
deleted file mode 100644
index 1608e96..0000000
--- 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.computingservice;
-
-//import java.util.List;
-
-public interface GeneralComputingService {
-  /**
-   * Provide the service identifier for this allocator
-   *
-   * @return the service identifier of this allocator
-   */
-  String getServiceId();
-
-  /**
-   * prepare native parameter frames for native execution
-   *
-   * @param npfs
-   *         a list of frame of native parameter
-   */
-  // void setNativeParameterFrames(List<List<long[]>> npfs);
-
-  /**
-   * perform native functionalities according to prepared computing parameters
-   *
-   * @param mode
-   *         a selection mode of run instance
-   *
-   * @param valinfos
-   *         an array of value info
-   *
-   * @return the array of handler about updated object graphs if any
-   */
-  long[] perform(String mode, ValueInfo[] valinfos);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/ValueInfo.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/ValueInfo.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/ValueInfo.java
deleted file mode 100644
index afb915f..0000000
--- 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/ValueInfo.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.computingservice;
-
-import org.apache.mnemonic.DurableType;
-
-public class ValueInfo {
-
-  /**
-   * a handler to a object graph
-   */
-  public long handler;
-  
-  /**
-   * a table for native address mapping
-   */
-  public long[][] transtable;
-  
-  /**
-   * a list of frame of native parameter
-   */
-  public long[][] frames;
-
-  /**
-   * a type of this specified value
-   */
-  public DurableType dtype;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/MemoryServiceFeature.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/MemoryServiceFeature.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/MemoryServiceFeature.java
new file mode 100644
index 0000000..1fa6ab8
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/MemoryServiceFeature.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.service.memory;
+
+public enum MemoryServiceFeature {
+
+  VOLATILE(1),
+  NONVOLATILE(2),
+  TRANSACTABLE(3),
+  QUERYABLE(4);
+
+  private int value;
+
+  MemoryServiceFeature(int val) {
+    this.value = val;
+  }
+
+  public int getValue() {
+    return value;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/NonVolatileMemoryAllocatorService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/NonVolatileMemoryAllocatorService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/NonVolatileMemoryAllocatorService.java
new file mode 100644
index 0000000..73b9d30
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/NonVolatileMemoryAllocatorService.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.mnemonic.service.memory;
+
+import java.nio.ByteBuffer;
+
+public interface NonVolatileMemoryAllocatorService extends 
VolatileMemoryAllocatorService {
+
+  /**
+   * retrieve a bytebuffer from its handler
+   *
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param handler
+   *          the handler of a nonvolatile bytebuffer
+   *
+   * @return the nonvolatile bytebuffer
+   *
+   */
+  ByteBuffer retrieveByteBuffer(long id, long handler);
+
+  /**
+   * retrieve the size of a nonvolatile memory object
+   *
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param addr
+   *          the address of a nonvolatile object
+   *
+   * @return the size of nonvolatile object
+   *
+   */
+  long retrieveSize(long id, long addr);
+
+  /**
+   * get the handler of a nonvolatile bytebuffer
+   *
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param buf
+   *          the nonvolatile bytebuffer
+   *
+   * @return the handler of this specified nonvolatile bytebuffer
+   *
+   */
+  long getByteBufferHandler(long id, ByteBuffer buf);
+
+  /**
+   * set a handler to a key.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param key
+   *          the key to set this handler
+   * 
+   * @param handler
+   *          the handler
+   */
+  void setHandler(long id, long key, long handler);
+
+  /**
+   * get a handler from specified key.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param key
+   *          the key to get its handler
+   * 
+   * @return the handler of the specified key
+   */
+  long getHandler(long id, long key);
+
+  /**
+   * return the number of available keys to use.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @return the number of keys
+   */
+  long handlerCapacity(long id);
+
+  /**
+   * Make any cached changes to a memory resource persistent.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param addr
+   *          the address of a memory resource
+   * 
+   * @param length
+   *          the length of the memory resource
+   * 
+   * @param autodetect
+   *          if NULL == address and autodetect : persist whole pool
+   *          if 0L == length and autodetect : persist block
+   */
+  void persist(long id, long addr, long length, boolean autodetect);
+
+  /**
+   * flush processors cache for a memory resource
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param addr
+   *          the address of a memory resource
+   * 
+   * @param length
+   *          the length of the memory resource
+   * 
+   * @param autodetect
+   *          if NULL == address and autodetect : flush whole pool
+   *          if 0L == length and autodetect : flush block
+   */
+  void flush(long id, long addr, long length, boolean autodetect);
+
+  /**
+   * wait for any memory resource stores to drain from HW buffers.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   */
+  void drain(long id);
+
+  /**
+   * return the base address of this persistent memory pool.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @return the base address of this pmem pool
+   */
+  long getBaseAddress(long id);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
new file mode 100644
index 0000000..8e9bcdd
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mnemonic.service.memory;
+
+public interface QueryableService {
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/VolatileMemoryAllocatorService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/VolatileMemoryAllocatorService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/VolatileMemoryAllocatorService.java
new file mode 100644
index 0000000..1b3f9bf
--- /dev/null
+++ 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memory/VolatileMemoryAllocatorService.java
@@ -0,0 +1,308 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.mnemonic.service.memory;
+
+import java.nio.ByteBuffer;
+import java.util.Set;
+
+public interface VolatileMemoryAllocatorService extends QueryableService {
+
+
+  /**
+   * retrieve a bytebuffer from its handler
+   *
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param handler
+   *          the handler of a nonvolatile bytebuffer
+   *
+   * @return the nonvolatile bytebuffer
+   *
+   */
+  ByteBuffer retrieveByteBuffer(long id, long handler);
+
+  /**
+   * retrieve the size of a nonvolatile memory object
+   *
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param handler
+   *          the handler of a nonvolatile object
+   *
+   * @return the size of nonvolatile object
+   *
+   */
+  long retrieveSize(long id, long handler);
+
+  /**
+   * get the handler of a nonvolatile bytebuffer
+   *
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param buf
+   *          the nonvolatile bytebuffer
+   *
+   * @return the handler of this specified nonvolatile bytebuffer
+   *
+   */
+  long getByteBufferHandler(long id, ByteBuffer buf);
+
+  /**
+   * set a handler to a key.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param key
+   *          the key to set this handler
+   * 
+   * @param handler
+   *          the handler
+   */
+  void setHandler(long id, long key, long handler);
+
+  /**
+   * get a handler from specified key.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param key
+   *          the key to get its handler
+   * 
+   * @return the handler of the specified key
+   */
+  long getHandler(long id, long key);
+
+  /**
+   * return the number of available keys to use.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @return the number of keys
+   */
+  long handlerCapacity(long id);
+
+  /**
+   * return the base address of this persistent memory pool.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @return the base address of this pmem pool
+   */
+  long getBaseAddress(long id);
+
+  /**
+   * Provide the service identifier for this allocator
+   *
+   * @return the service identifier of this allocator
+   */
+  String getServiceId();
+
+  /**
+   * Initialize a memory pool through native interface backed by native 
library.
+   * 
+   * @param capacity
+   *          the capacity of memory pool
+   * 
+   * @param uri
+   *          the location of memory pool will be created
+   * 
+   * @param isnew
+   *          a place holder, always specify it as true
+   *
+   * @return the identifier of created memory pool
+   */
+  long init(long capacity, String uri, boolean isnew);
+
+  /**
+   * Adjust the capacity of a memory pool
+   *
+   * @param id
+   *         specify the id of underlying native allocator
+   *
+   * @param reserve
+   *         reserve certain amount of memory space in tail for use
+   *
+   * @return the new capacity
+   */
+  long adjustCapacity(long id, long reserve);
+
+  /**
+   * close the memory pool through native interface.
+   *
+   * @param id
+   *         specify the id of underlying native allocator
+   */
+  void close(long id);
+
+  /**
+   * force to synchronize an uncommitted data to backed memory pool.
+   *
+   * @param id
+   *         specify the id of underlying native allocator
+   * 
+   * @param addr
+   *          the address of a memory resource
+   * 
+   * @param length
+   *          the length of the memory resource
+   * 
+   * @param autodetect
+   *          if NULL == address and autodetect : sync. whole pool
+   *          if 0L == length and autodetect : sync. block
+   */
+  void sync(long id, long addr, long length, boolean autodetect);
+
+  /**
+   * get the capacity of its managed memory space
+   *
+   * @param id
+   *         specify the id of underlying native allocator
+   *
+   * @return the capacity of this allocator managed memory resource/device
+   */
+  long capacity(long id);
+
+  /**
+   * allocate specified size of memory block from backed memory pool.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param size
+   *          specify size of memory block to be allocated
+   *
+   * @param initzero
+   *          indicate if initialize it with zeros
+   *
+   * @return the address of allocated memory block from native memory pool
+   */
+  long allocate(long id, long size, boolean initzero);
+
+  /**
+   * reallocate a specified size of memory block from backed memory pool.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param addr
+   *          the address of previous allocated memory block. it can be null.
+   * 
+   * @param size
+   *          specify new size of memory block to be reallocated
+   * 
+   * @param initzero
+   *          indicate if initialize it with zeros
+   *
+   * @return the address of reallocated memory block from native memory pool
+   */
+  long reallocate(long id, long addr, long size, boolean initzero);
+
+  /**
+   * free a memory block by specify its address into backed memory pool.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param addr
+   *          the address of allocated memory block.
+   */
+  void free(long id, long addr);
+
+  /**
+   * create a ByteBuffer object which backed buffer is coming from backed 
native
+   * memory pool.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param size
+   *          the size of backed buffer that is managed by created ByteBuffer
+   *          object.
+   * 
+   * @return a created ByteBuffer object with a backed native memory block
+   */
+  ByteBuffer createByteBuffer(long id, long size);
+
+  /**
+   * resize a ByteBuffer object which backed buffer is coming from backed 
native
+   * memory pool. NOTE: the ByteBuffer object will be renewed and lost metadata
+   * e.g. position, mark and etc.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param bytebuf
+   *          the specified ByteBuffer object to be destroyed
+   * 
+   * @param size
+   *          the new size of backed buffer that is managed by created
+   *          ByteBuffer object.
+   * 
+   * @return a created ByteBuffer object with a backed native memory block
+   */
+  ByteBuffer resizeByteBuffer(long id, ByteBuffer bytebuf, long size);
+
+  /**
+   * destroy a native memory block backed ByteBuffer object.
+   * 
+   * @param id
+   *          the identifier of backed memory pool
+   * 
+   * @param bytebuf
+   *          the specified ByteBuffer object to be destroyed
+   */
+  void destroyByteBuffer(long id, ByteBuffer bytebuf);
+
+  /**
+   * begin a transaction
+   * @param readOnly
+   *          specify if the transaction is readonly
+   */
+  void beginTransaction(boolean readOnly);
+
+  /**
+   * commit current transaction
+   */
+  void commitTransaction();
+
+  /**
+   * abort current transaction
+   */
+  void abortTransaction();
+
+  /**
+   * determine if in a transaction
+   * @return the true if it is in a transaction
+   */
+  boolean isInTransaction();
+
+  /**
+   * provide a set of features that the memory service can offer
+   *
+   * @return a set of features that supported by this memory service
+   */
+  Set<MemoryServiceFeature> getFeatures();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/MemoryServiceFeature.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/MemoryServiceFeature.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/MemoryServiceFeature.java
deleted file mode 100644
index 80be41c..0000000
--- 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/MemoryServiceFeature.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.mnemonic.service.memoryservice;
-
-public enum MemoryServiceFeature {
-
-  VOLATILE(1),
-  NONVOLATILE(2),
-  TRANSACTABLE(3),
-  QUERYABLE(4);
-
-  private int value;
-
-  MemoryServiceFeature(int val) {
-    this.value = val;
-  }
-
-  public int getValue() {
-    return value;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/NonVolatileMemoryAllocatorService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/NonVolatileMemoryAllocatorService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/NonVolatileMemoryAllocatorService.java
deleted file mode 100644
index 9686826..0000000
--- 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/NonVolatileMemoryAllocatorService.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.memoryservice;
-
-import java.nio.ByteBuffer;
-
-public interface NonVolatileMemoryAllocatorService extends 
VolatileMemoryAllocatorService {
-
-  /**
-   * retrieve a bytebuffer from its handler
-   *
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param handler
-   *          the handler of a nonvolatile bytebuffer
-   *
-   * @return the nonvolatile bytebuffer
-   *
-   */
-  ByteBuffer retrieveByteBuffer(long id, long handler);
-
-  /**
-   * retrieve the size of a nonvolatile memory object
-   *
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param addr
-   *          the address of a nonvolatile object
-   *
-   * @return the size of nonvolatile object
-   *
-   */
-  long retrieveSize(long id, long addr);
-
-  /**
-   * get the handler of a nonvolatile bytebuffer
-   *
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param buf
-   *          the nonvolatile bytebuffer
-   *
-   * @return the handler of this specified nonvolatile bytebuffer
-   *
-   */
-  long getByteBufferHandler(long id, ByteBuffer buf);
-
-  /**
-   * set a handler to a key.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param key
-   *          the key to set this handler
-   * 
-   * @param handler
-   *          the handler
-   */
-  void setHandler(long id, long key, long handler);
-
-  /**
-   * get a handler from specified key.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param key
-   *          the key to get its handler
-   * 
-   * @return the handler of the specified key
-   */
-  long getHandler(long id, long key);
-
-  /**
-   * return the number of available keys to use.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @return the number of keys
-   */
-  long handlerCapacity(long id);
-
-  /**
-   * Make any cached changes to a memory resource persistent.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param addr
-   *          the address of a memory resource
-   * 
-   * @param length
-   *          the length of the memory resource
-   * 
-   * @param autodetect
-   *          if NULL == address and autodetect : persist whole pool
-   *          if 0L == length and autodetect : persist block
-   */
-  void persist(long id, long addr, long length, boolean autodetect);
-
-  /**
-   * flush processors cache for a memory resource
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param addr
-   *          the address of a memory resource
-   * 
-   * @param length
-   *          the length of the memory resource
-   * 
-   * @param autodetect
-   *          if NULL == address and autodetect : flush whole pool
-   *          if 0L == length and autodetect : flush block
-   */
-  void flush(long id, long addr, long length, boolean autodetect);
-
-  /**
-   * wait for any memory resource stores to drain from HW buffers.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   */
-  void drain(long id);
-
-  /**
-   * return the base address of this persistent memory pool.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @return the base address of this pmem pool
-   */
-  long getBaseAddress(long id);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
 
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
deleted file mode 100644
index fc11cd2..0000000
--- 
a/mnemonic-core/src/main/java/org/apache/mnemonic/service/memoryservice/VolatileMemoryAllocatorService.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.mnemonic.service.memoryservice;
-
-import java.nio.ByteBuffer;
-import java.util.Set;
-
-public interface VolatileMemoryAllocatorService {
-
-
-  /**
-   * retrieve a bytebuffer from its handler
-   *
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param handler
-   *          the handler of a nonvolatile bytebuffer
-   *
-   * @return the nonvolatile bytebuffer
-   *
-   */
-  ByteBuffer retrieveByteBuffer(long id, long handler);
-
-  /**
-   * retrieve the size of a nonvolatile memory object
-   *
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param handler
-   *          the handler of a nonvolatile object
-   *
-   * @return the size of nonvolatile object
-   *
-   */
-  long retrieveSize(long id, long handler);
-
-  /**
-   * get the handler of a nonvolatile bytebuffer
-   *
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param buf
-   *          the nonvolatile bytebuffer
-   *
-   * @return the handler of this specified nonvolatile bytebuffer
-   *
-   */
-  long getByteBufferHandler(long id, ByteBuffer buf);
-
-  /**
-   * set a handler to a key.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param key
-   *          the key to set this handler
-   * 
-   * @param handler
-   *          the handler
-   */
-  void setHandler(long id, long key, long handler);
-
-  /**
-   * get a handler from specified key.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param key
-   *          the key to get its handler
-   * 
-   * @return the handler of the specified key
-   */
-  long getHandler(long id, long key);
-
-  /**
-   * return the number of available keys to use.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @return the number of keys
-   */
-  long handlerCapacity(long id);
-
-  /**
-   * return the base address of this persistent memory pool.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @return the base address of this pmem pool
-   */
-  long getBaseAddress(long id);
-
-  /**
-   * Provide the service identifier for this allocator
-   *
-   * @return the service identifier of this allocator
-   */
-  String getServiceId();
-
-  /**
-   * Initialize a memory pool through native interface backed by native 
library.
-   * 
-   * @param capacity
-   *          the capacity of memory pool
-   * 
-   * @param uri
-   *          the location of memory pool will be created
-   * 
-   * @param isnew
-   *          a place holder, always specify it as true
-   *
-   * @return the identifier of created memory pool
-   */
-  long init(long capacity, String uri, boolean isnew);
-
-  /**
-   * Adjust the capacity of a memory pool
-   *
-   * @param id
-   *         specify the id of underlying native allocator
-   *
-   * @param reserve
-   *         reserve certain amount of memory space in tail for use
-   *
-   * @return the new capacity
-   */
-  long adjustCapacity(long id, long reserve);
-
-  /**
-   * close the memory pool through native interface.
-   *
-   * @param id
-   *         specify the id of underlying native allocator
-   */
-  void close(long id);
-
-  /**
-   * force to synchronize an uncommitted data to backed memory pool.
-   *
-   * @param id
-   *         specify the id of underlying native allocator
-   * 
-   * @param addr
-   *          the address of a memory resource
-   * 
-   * @param length
-   *          the length of the memory resource
-   * 
-   * @param autodetect
-   *          if NULL == address and autodetect : sync. whole pool
-   *          if 0L == length and autodetect : sync. block
-   */
-  void sync(long id, long addr, long length, boolean autodetect);
-
-  /**
-   * get the capacity of its managed memory space
-   *
-   * @param id
-   *         specify the id of underlying native allocator
-   *
-   * @return the capacity of this allocator managed memory resource/device
-   */
-  long capacity(long id);
-
-  /**
-   * allocate specified size of memory block from backed memory pool.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param size
-   *          specify size of memory block to be allocated
-   *
-   * @param initzero
-   *          indicate if initialize it with zeros
-   *
-   * @return the address of allocated memory block from native memory pool
-   */
-  long allocate(long id, long size, boolean initzero);
-
-  /**
-   * reallocate a specified size of memory block from backed memory pool.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param addr
-   *          the address of previous allocated memory block. it can be null.
-   * 
-   * @param size
-   *          specify new size of memory block to be reallocated
-   * 
-   * @param initzero
-   *          indicate if initialize it with zeros
-   *
-   * @return the address of reallocated memory block from native memory pool
-   */
-  long reallocate(long id, long addr, long size, boolean initzero);
-
-  /**
-   * free a memory block by specify its address into backed memory pool.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param addr
-   *          the address of allocated memory block.
-   */
-  void free(long id, long addr);
-
-  /**
-   * create a ByteBuffer object which backed buffer is coming from backed 
native
-   * memory pool.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param size
-   *          the size of backed buffer that is managed by created ByteBuffer
-   *          object.
-   * 
-   * @return a created ByteBuffer object with a backed native memory block
-   */
-  ByteBuffer createByteBuffer(long id, long size);
-
-  /**
-   * resize a ByteBuffer object which backed buffer is coming from backed 
native
-   * memory pool. NOTE: the ByteBuffer object will be renewed and lost metadata
-   * e.g. position, mark and etc.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param bytebuf
-   *          the specified ByteBuffer object to be destroyed
-   * 
-   * @param size
-   *          the new size of backed buffer that is managed by created
-   *          ByteBuffer object.
-   * 
-   * @return a created ByteBuffer object with a backed native memory block
-   */
-  ByteBuffer resizeByteBuffer(long id, ByteBuffer bytebuf, long size);
-
-  /**
-   * destroy a native memory block backed ByteBuffer object.
-   * 
-   * @param id
-   *          the identifier of backed memory pool
-   * 
-   * @param bytebuf
-   *          the specified ByteBuffer object to be destroyed
-   */
-  void destroyByteBuffer(long id, ByteBuffer bytebuf);
-
-  /**
-   * begin a transaction
-   * @param readOnly
-   *          specify if the transaction is readonly
-   */
-  void beginTransaction(boolean readOnly);
-
-  /**
-   * commit current transaction
-   */
-  void commitTransaction();
-
-  /**
-   * abort current transaction
-   */
-  void abortTransaction();
-
-  /**
-   * determine if in a transaction
-   * @return the true if it is in a transaction
-   */
-  boolean isInTransaction();
-
-  /**
-   * provide a set of features that the memory service can offer
-   *
-   * @return a set of features that supported by this memory service
-   */
-  Set<MemoryServiceFeature> getFeatures();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/test/resources/testng.xml
----------------------------------------------------------------------
diff --git 
a/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/test/resources/testng.xml 
b/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/test/resources/testng.xml
index 3dcc372..759a69a 100644
--- a/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/test/resources/testng.xml
+++ b/mnemonic-hadoop/mnemonic-hadoop-mapreduce/src/test/resources/testng.xml
@@ -30,5 +30,5 @@
 
 
 <!--
-      <class 
name="org.apache.mnemonic.service.computingservice.DurableSinglyLinkedListNGPrintTest"/>
 
+      <class 
name="org.apache.mnemonic.service.computing.DurableSinglyLinkedListNGPrintTest"/>
  -->

Reply via email to