Repository: incubator-mnemonic
Updated Branches:
  refs/heads/master cda2b43ee -> a4bb10ebd


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memory/internal/SysVMemServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memory/internal/SysVMemServiceImpl.java
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memory/internal/SysVMemServiceImpl.java
new file mode 100644
index 0000000..b262f09
--- /dev/null
+++ 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memory/internal/SysVMemServiceImpl.java
@@ -0,0 +1,201 @@
+/*
+ * 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.internal;
+
+import org.apache.mnemonic.service.memory.MemoryServiceFeature;
+import org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService;
+import org.flowcomputing.commons.primitives.NativeLibraryLoader;
+
+import java.nio.ByteBuffer;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.HashSet;
+
+public class SysVMemServiceImpl implements VolatileMemoryAllocatorService {
+  static {
+    try {
+      NativeLibraryLoader.loadFromJar("sysvmemallocator");
+    } catch (Exception e) {
+      throw new Error(e);
+    }
+  }
+
+  protected Map<Long, Long> m_info = Collections.synchronizedMap(new 
HashMap<Long, Long>());
+
+  @Override
+  public String getServiceId() {
+    return "sysvmem";
+  }
+
+  @Override
+  public long init(long capacity, String uri, boolean isnew) {
+    long ret = ninit(capacity, uri, isnew);
+    m_info.put(ret, capacity);
+    return ret;
+  }
+
+  @Override
+  public long adjustCapacity(long id, long reserve) {
+    throw new UnsupportedOperationException("Unsupported to reduce capacity of 
this memory service");
+  }
+
+  @Override
+  public void close(long id) {
+    nclose(id);
+  }
+
+  @Override
+  public void sync(long id, long addr, long length, boolean autodetect) {
+    nsync(id, addr, length, autodetect);
+  }
+
+  @Override
+  public long capacity(long id) {
+    return m_info.get(id);
+  }
+
+  @Override
+  public long allocate(long id, long size, boolean initzero) {
+    return nallocate(id, size, initzero);
+  }
+
+  @Override
+  public long reallocate(long id, long addr, long size, boolean initzero) {
+    return nreallocate(id, addr, size, initzero);
+  }
+
+  @Override
+  public void free(long id, long addr) {
+    nfree(id, addr);
+  }
+
+  @Override
+  public ByteBuffer createByteBuffer(long id, long size) {
+    return ncreateByteBuffer(id, size);
+  }
+
+  @Override
+  public ByteBuffer resizeByteBuffer(long id, ByteBuffer bytebuf, long size) {
+    return nresizeByteBuffer(id, bytebuf, size);
+  }
+
+  @Override
+  public void destroyByteBuffer(long id, ByteBuffer bytebuf) {
+    ndestroyByteBuffer(id, bytebuf);
+  }
+
+  @Override
+  public ByteBuffer retrieveByteBuffer(long id, long handler) {
+    return nretrieveByteBuffer(id, handler);
+  }
+
+  @Override
+  public long retrieveSize(long id, long handler) {
+    return nretrieveSize(id, handler);
+  }
+
+  @Override
+  public long getByteBufferHandler(long id, ByteBuffer buf) {
+    return ngetByteBufferHandler(id, buf);
+  }
+
+  @Override
+  public void setHandler(long id, long key, long handler) {
+    nsetHandler(id, key, handler);
+  }
+
+  @Override
+  public long getHandler(long id, long key) {
+    return ngetHandler(id, key);
+  }
+
+  @Override
+  public long handlerCapacity(long id) {
+    return nhandlerCapacity(id);
+  }
+
+  @Override
+  public long getBaseAddress(long id) {
+    return 0L;
+    //return ngetBaseAddress(id);
+  }
+
+  @Override
+  public void beginTransaction(boolean readOnly) {
+    throw new UnsupportedOperationException("Not support transaction");
+  }
+
+  @Override
+  public void commitTransaction() {
+    throw new UnsupportedOperationException("Not support transaction");
+  }
+
+  @Override
+  public void abortTransaction() {
+    throw new UnsupportedOperationException("Not support transaction");
+  }
+
+  @Override
+  public boolean isInTransaction() {
+    throw new UnsupportedOperationException("Not support transaction");
+  }
+
+  @Override
+  public Set<MemoryServiceFeature> getFeatures() {
+    Set<MemoryServiceFeature> ret = new HashSet<MemoryServiceFeature>();
+    ret.add(MemoryServiceFeature.VOLATILE);
+    return ret;
+  }
+
+  protected native long ninit(long capacity, String uri, boolean isnew);
+
+  protected native void nclose(long id);
+
+  protected native void nsync(long id, long addr, long length, boolean 
autodetect);
+
+  protected native long ncapacity(long id);
+
+  protected native long nallocate(long id, long size, boolean initzero);
+
+  protected native long nreallocate(long id, long addr, long size, boolean 
initzero);
+
+  protected native void nfree(long id, long addr);
+
+  protected native ByteBuffer ncreateByteBuffer(long id, long size);
+
+  protected native ByteBuffer nresizeByteBuffer(long id, ByteBuffer bytebuf, 
long size);
+
+  protected native void ndestroyByteBuffer(long id, ByteBuffer bytebuf);
+
+  protected native ByteBuffer nretrieveByteBuffer(long id, long handler);
+
+  protected native long nretrieveSize(long id, long handler);
+
+  protected native long ngetByteBufferHandler(long id, ByteBuffer buf);
+
+  protected native void nsetHandler(long id, long key, long handler);
+
+  protected native long ngetHandler(long id, long key);
+
+  protected native long nhandlerCapacity(long id);
+
+  protected native long ngetBaseAddress(long id);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
deleted file mode 100644
index 628897d..0000000
--- 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/java/org/apache/mnemonic/service/memoryservice/internal/SysVMemServiceImpl.java
+++ /dev/null
@@ -1,201 +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.internal;
-
-import org.apache.mnemonic.service.memoryservice.MemoryServiceFeature;
-import 
org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService;
-import org.flowcomputing.commons.primitives.NativeLibraryLoader;
-
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.HashSet;
-
-public class SysVMemServiceImpl implements VolatileMemoryAllocatorService {
-  static {
-    try {
-      NativeLibraryLoader.loadFromJar("sysvmemallocator");
-    } catch (Exception e) {
-      throw new Error(e);
-    }
-  }
-
-  protected Map<Long, Long> m_info = Collections.synchronizedMap(new 
HashMap<Long, Long>());
-
-  @Override
-  public String getServiceId() {
-    return "sysvmem";
-  }
-
-  @Override
-  public long init(long capacity, String uri, boolean isnew) {
-    long ret = ninit(capacity, uri, isnew);
-    m_info.put(ret, capacity);
-    return ret;
-  }
-
-  @Override
-  public long adjustCapacity(long id, long reserve) {
-    throw new UnsupportedOperationException("Unsupported to reduce capacity of 
this memory service");
-  }
-
-  @Override
-  public void close(long id) {
-    nclose(id);
-  }
-
-  @Override
-  public void sync(long id, long addr, long length, boolean autodetect) {
-    nsync(id, addr, length, autodetect);
-  }
-
-  @Override
-  public long capacity(long id) {
-    return m_info.get(id);
-  }
-
-  @Override
-  public long allocate(long id, long size, boolean initzero) {
-    return nallocate(id, size, initzero);
-  }
-
-  @Override
-  public long reallocate(long id, long addr, long size, boolean initzero) {
-    return nreallocate(id, addr, size, initzero);
-  }
-
-  @Override
-  public void free(long id, long addr) {
-    nfree(id, addr);
-  }
-
-  @Override
-  public ByteBuffer createByteBuffer(long id, long size) {
-    return ncreateByteBuffer(id, size);
-  }
-
-  @Override
-  public ByteBuffer resizeByteBuffer(long id, ByteBuffer bytebuf, long size) {
-    return nresizeByteBuffer(id, bytebuf, size);
-  }
-
-  @Override
-  public void destroyByteBuffer(long id, ByteBuffer bytebuf) {
-    ndestroyByteBuffer(id, bytebuf);
-  }
-
-  @Override
-  public ByteBuffer retrieveByteBuffer(long id, long handler) {
-    return nretrieveByteBuffer(id, handler);
-  }
-
-  @Override
-  public long retrieveSize(long id, long handler) {
-    return nretrieveSize(id, handler);
-  }
-
-  @Override
-  public long getByteBufferHandler(long id, ByteBuffer buf) {
-    return ngetByteBufferHandler(id, buf);
-  }
-
-  @Override
-  public void setHandler(long id, long key, long handler) {
-    nsetHandler(id, key, handler);
-  }
-
-  @Override
-  public long getHandler(long id, long key) {
-    return ngetHandler(id, key);
-  }
-
-  @Override
-  public long handlerCapacity(long id) {
-    return nhandlerCapacity(id);
-  }
-
-  @Override
-  public long getBaseAddress(long id) {
-    return 0L;
-    //return ngetBaseAddress(id);
-  }
-
-  @Override
-  public void beginTransaction(boolean readOnly) {
-    throw new UnsupportedOperationException("Not support transaction");
-  }
-
-  @Override
-  public void commitTransaction() {
-    throw new UnsupportedOperationException("Not support transaction");
-  }
-
-  @Override
-  public void abortTransaction() {
-    throw new UnsupportedOperationException("Not support transaction");
-  }
-
-  @Override
-  public boolean isInTransaction() {
-    throw new UnsupportedOperationException("Not support transaction");
-  }
-
-  @Override
-  public Set<MemoryServiceFeature> getFeatures() {
-    Set<MemoryServiceFeature> ret = new HashSet<MemoryServiceFeature>();
-    ret.add(MemoryServiceFeature.VOLATILE);
-    return ret;
-  }
-
-  protected native long ninit(long capacity, String uri, boolean isnew);
-
-  protected native void nclose(long id);
-
-  protected native void nsync(long id, long addr, long length, boolean 
autodetect);
-
-  protected native long ncapacity(long id);
-
-  protected native long nallocate(long id, long size, boolean initzero);
-
-  protected native long nreallocate(long id, long addr, long size, boolean 
initzero);
-
-  protected native void nfree(long id, long addr);
-
-  protected native ByteBuffer ncreateByteBuffer(long id, long size);
-
-  protected native ByteBuffer nresizeByteBuffer(long id, ByteBuffer bytebuf, 
long size);
-
-  protected native void ndestroyByteBuffer(long id, ByteBuffer bytebuf);
-
-  protected native ByteBuffer nretrieveByteBuffer(long id, long handler);
-
-  protected native long nretrieveSize(long id, long handler);
-
-  protected native long ngetByteBufferHandler(long id, ByteBuffer buf);
-
-  protected native void nsetHandler(long id, long key, long handler);
-
-  protected native long ngetHandler(long id, long key);
-
-  protected native long nhandlerCapacity(long id);
-
-  protected native long ngetBaseAddress(long id);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/CMakeLists.txt
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/CMakeLists.txt
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/CMakeLists.txt
index 0e6de72..3631b7f 100644
--- 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/CMakeLists.txt
+++ 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/CMakeLists.txt
@@ -38,7 +38,7 @@ include_directories(${JNI_INCLUDE_DIRS})
 find_package(Threads REQUIRED)
 include_directories(${CMAKE_THREAD_LIBS_INIT})
 
-add_library(sysvmemallocator SHARED common.c 
org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.c)
+add_library(sysvmemallocator SHARED common.c 
org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.c)
 target_include_directories(sysvmemallocator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 
 include (InstallRequiredSystemLibraries)

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.c
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.c
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.c
new file mode 100644
index 0000000..4954185
--- /dev/null
+++ 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.c
@@ -0,0 +1,238 @@
+/**
+ * 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.
+ */
+
+#include "org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.h"
+
+static SysVMPool *g_sysvmpool_arr = NULL;
+static size_t g_sysvmpool_count = 0;
+
+static pthread_rwlock_t g_sysvmem_rwlock = PTHREAD_RWLOCK_INITIALIZER;
+
+/******************************************************************************
+ ** JNI implementations
+ *****************************************************************************/
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nallocate(JNIEnv*
 env,
+    jobject this, jlong id, jlong size, jboolean initzero) {
+  SysVMPool *pool;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  void* nativebuf = sysvrealloc(pool, NULL, size, initzero);
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  return addr_to_java(nativebuf);
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nreallocate(JNIEnv*
 env,
+    jobject this, jlong id, jlong addr, jlong size, jboolean initzero) {
+  SysVMPool *pool;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  void* p = addr_from_java(addr);
+  void* nativebuf = sysvrealloc(pool, p, size, initzero);
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  return addr_to_java(nativebuf);
+}
+
+JNIEXPORT
+void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nfree(
+    JNIEnv* env,
+    jobject this, jlong id,
+    jlong addr) {
+  SysVMPool *pool;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  void* nativebuf = addr_from_java(addr);
+  sysvfree(pool, nativebuf);
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+}
+
+JNIEXPORT
+void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nsync(
+    JNIEnv* env,
+    jobject this, jlong id, jlong addr, jlong len, jboolean autodetect)
+{
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ncapacity(
+    JNIEnv* env,
+    jobject this, jlong id)
+{
+  SysVMPool *pool;
+  pool = g_sysvmpool_arr + id;
+  return 0L;
+}
+
+JNIEXPORT
+jobject JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ncreateByteBuffer(
+    JNIEnv *env, jobject this, jlong id, jlong size) {
+  SysVMPool *pool;
+  jobject ret = NULL;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  void* nativebuf = sysvrealloc(pool, NULL, size, 0);
+  ret = NULL != nativebuf ? (*env)->NewDirectByteBuffer(env, nativebuf, size) 
: NULL;
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  return ret;
+}
+
+JNIEXPORT
+jobject JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nretrieveByteBuffer(
+    JNIEnv *env, jobject this, jlong id, jlong addr) {
+  jobject ret = NULL;
+  void* p = addr_from_java(addr);
+  if (NULL != p) {
+    void* nativebuf = p - PMBHSZ;
+    ret = (*env)->NewDirectByteBuffer(env, p, ((PMBHeader *) nativebuf)->size 
- PMBHSZ);
+  }
+  return ret;
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nretrieveSize(JNIEnv
 *env,
+    jobject this, jlong id, jlong addr) {
+  SysVMPool *pool;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  void* p = addr_from_java(addr);
+  jlong ret = sysvsize(pool, p);
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  return ret;
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ngetByteBufferHandler(
+    JNIEnv *env, jobject this, jlong id, jobject bytebuf) {
+  jlong ret = 0L;
+  if (NULL != bytebuf) {
+    void* nativebuf = (*env)->GetDirectBufferAddress(env, bytebuf);
+    ret = addr_to_java(nativebuf);
+  }
+  return ret;
+}
+
+JNIEXPORT
+jobject JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nresizeByteBuffer(
+    JNIEnv *env, jobject this, jlong id, jobject bytebuf, jlong size) {
+  SysVMPool *pool;
+  jobject ret = NULL;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  if (NULL != bytebuf) {
+    void* nativebuf = (void*) (*env)->GetDirectBufferAddress(env, bytebuf);
+    if (nativebuf != NULL) {
+      nativebuf = sysvrealloc(pool, nativebuf, size, 0);
+      if (NULL != nativebuf) {
+        ret = (*env)->NewDirectByteBuffer(env, nativebuf, size);
+      }
+    }
+  }
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  return ret;
+}
+
+JNIEXPORT
+void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ndestroyByteBuffer(
+    JNIEnv *env, jobject this, jlong id, jobject bytebuf) {
+  SysVMPool *pool;
+  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  if (NULL != bytebuf) {
+    void* nativebuf = (*env)->GetDirectBufferAddress(env, bytebuf);
+    if (nativebuf != NULL) {
+      sysvfree(pool, nativebuf);
+    }
+  }
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+}
+
+
+JNIEXPORT
+void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nsetHandler(
+    JNIEnv *env, jobject this, jlong id, jlong key, jlong value)
+{
+  throw(env, "setkey()/getkey() temporarily not supported");
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ngetHandler(JNIEnv
 *env,
+    jobject this, jlong id, jlong key) {
+  throw(env, "setkey()/getkey() temporarily not supported");
+  return 0;
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nhandlerCapacity(
+    JNIEnv *env, jobject this) {
+  throw(env, "setkey()/getkey() temporarily not supported");
+  return 0;
+}
+
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ngetBaseAddress(JNIEnv
 *env,
+    jobject this, jlong id) {
+  return 0L;
+}
+
+JNIEXPORT
+jlong JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_ninit(JNIEnv
 *env, jclass this,
+    jlong capacity, jstring pathname, jboolean isnew) {
+  pthread_rwlock_wrlock(&g_sysvmem_rwlock);
+  SysVMPool *pool;
+  size_t ret = -1;
+  g_sysvmpool_arr = realloc(g_sysvmpool_arr, (g_sysvmpool_count + 1) * 
sizeof(SysVMPool));
+  if (NULL != g_sysvmpool_arr) {
+    pool = g_sysvmpool_arr + g_sysvmpool_count;
+    ret = g_sysvmpool_count;
+    g_sysvmpool_count++;
+  } else {
+    pthread_rwlock_unlock(&g_sysvmem_rwlock);
+    throw(env, "Out of memory!");
+  }
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  return ret;
+}
+
+JNIEXPORT
+void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_nclose
+(JNIEnv *env, jobject this, jlong id)
+{
+  SysVMPool *pool;
+  pthread_rwlock_wrlock(&g_sysvmem_rwlock);
+  pool = g_sysvmpool_arr + id;
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+}
+
+__attribute__((destructor)) void fini(void) {
+  int i;
+  SysVMPool *pool;
+  pthread_rwlock_wrlock(&g_sysvmem_rwlock);
+  if (NULL != g_sysvmpool_arr) {
+    for (i = 0; i < g_sysvmpool_count; ++i) {
+      pool = g_sysvmpool_arr + i;
+    }
+    free(g_sysvmpool_arr);
+    g_sysvmpool_arr = NULL;
+    g_sysvmpool_count = 0;
+  }
+  pthread_rwlock_unlock(&g_sysvmem_rwlock);
+  pthread_rwlock_destroy(&g_sysvmem_rwlock);
+}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.h
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.h
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.h
new file mode 100644
index 0000000..2d88fe8
--- /dev/null
+++ 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl.h
@@ -0,0 +1,48 @@
+/**
+ * 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.
+ */
+
+#include <jni.h>
+/* Header for class 
org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl */
+
+#include "common.h"
+
+#ifndef 
_Included_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl
+#define 
_Included_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl
+ * Method:    jniInit
+ * Signature: (II)V
+ */
+JNIEXPORT void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_jniInit
+(JNIEnv *, jobject, jint, jint);
+
+/*
+ * Class:     org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl
+ * Method:    jniTerm
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL 
Java_org_apache_mnemonic_service_memory_internal_SysVMemServiceImpl_jniTerm
+(JNIEnv *, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.c
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.c
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.c
deleted file mode 100644
index 9a61765..0000000
--- 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.c
+++ /dev/null
@@ -1,238 +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.
- */
-
-#include 
"org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.h"
-
-static SysVMPool *g_sysvmpool_arr = NULL;
-static size_t g_sysvmpool_count = 0;
-
-static pthread_rwlock_t g_sysvmem_rwlock = PTHREAD_RWLOCK_INITIALIZER;
-
-/******************************************************************************
- ** JNI implementations
- *****************************************************************************/
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nallocate(JNIEnv*
 env,
-    jobject this, jlong id, jlong size, jboolean initzero) {
-  SysVMPool *pool;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  void* nativebuf = sysvrealloc(pool, NULL, size, initzero);
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  return addr_to_java(nativebuf);
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nreallocate(JNIEnv*
 env,
-    jobject this, jlong id, jlong addr, jlong size, jboolean initzero) {
-  SysVMPool *pool;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  void* p = addr_from_java(addr);
-  void* nativebuf = sysvrealloc(pool, p, size, initzero);
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  return addr_to_java(nativebuf);
-}
-
-JNIEXPORT
-void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nfree(
-    JNIEnv* env,
-    jobject this, jlong id,
-    jlong addr) {
-  SysVMPool *pool;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  void* nativebuf = addr_from_java(addr);
-  sysvfree(pool, nativebuf);
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-}
-
-JNIEXPORT
-void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nsync(
-    JNIEnv* env,
-    jobject this, jlong id, jlong addr, jlong len, jboolean autodetect)
-{
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ncapacity(
-    JNIEnv* env,
-    jobject this, jlong id)
-{
-  SysVMPool *pool;
-  pool = g_sysvmpool_arr + id;
-  return 0L;
-}
-
-JNIEXPORT
-jobject JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ncreateByteBuffer(
-    JNIEnv *env, jobject this, jlong id, jlong size) {
-  SysVMPool *pool;
-  jobject ret = NULL;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  void* nativebuf = sysvrealloc(pool, NULL, size, 0);
-  ret = NULL != nativebuf ? (*env)->NewDirectByteBuffer(env, nativebuf, size) 
: NULL;
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  return ret;
-}
-
-JNIEXPORT
-jobject JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nretrieveByteBuffer(
-    JNIEnv *env, jobject this, jlong id, jlong addr) {
-  jobject ret = NULL;
-  void* p = addr_from_java(addr);
-  if (NULL != p) {
-    void* nativebuf = p - PMBHSZ;
-    ret = (*env)->NewDirectByteBuffer(env, p, ((PMBHeader *) nativebuf)->size 
- PMBHSZ);
-  }
-  return ret;
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nretrieveSize(JNIEnv
 *env,
-    jobject this, jlong id, jlong addr) {
-  SysVMPool *pool;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  void* p = addr_from_java(addr);
-  jlong ret = sysvsize(pool, p);
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  return ret;
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ngetByteBufferHandler(
-    JNIEnv *env, jobject this, jlong id, jobject bytebuf) {
-  jlong ret = 0L;
-  if (NULL != bytebuf) {
-    void* nativebuf = (*env)->GetDirectBufferAddress(env, bytebuf);
-    ret = addr_to_java(nativebuf);
-  }
-  return ret;
-}
-
-JNIEXPORT
-jobject JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nresizeByteBuffer(
-    JNIEnv *env, jobject this, jlong id, jobject bytebuf, jlong size) {
-  SysVMPool *pool;
-  jobject ret = NULL;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  if (NULL != bytebuf) {
-    void* nativebuf = (void*) (*env)->GetDirectBufferAddress(env, bytebuf);
-    if (nativebuf != NULL) {
-      nativebuf = sysvrealloc(pool, nativebuf, size, 0);
-      if (NULL != nativebuf) {
-        ret = (*env)->NewDirectByteBuffer(env, nativebuf, size);
-      }
-    }
-  }
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  return ret;
-}
-
-JNIEXPORT
-void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ndestroyByteBuffer(
-    JNIEnv *env, jobject this, jlong id, jobject bytebuf) {
-  SysVMPool *pool;
-  pthread_rwlock_rdlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  if (NULL != bytebuf) {
-    void* nativebuf = (*env)->GetDirectBufferAddress(env, bytebuf);
-    if (nativebuf != NULL) {
-      sysvfree(pool, nativebuf);
-    }
-  }
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-}
-
-
-JNIEXPORT
-void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nsetHandler(
-    JNIEnv *env, jobject this, jlong id, jlong key, jlong value)
-{
-  throw(env, "setkey()/getkey() temporarily not supported");
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ngetHandler(JNIEnv
 *env,
-    jobject this, jlong id, jlong key) {
-  throw(env, "setkey()/getkey() temporarily not supported");
-  return 0;
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nhandlerCapacity(
-    JNIEnv *env, jobject this) {
-  throw(env, "setkey()/getkey() temporarily not supported");
-  return 0;
-}
-
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ngetBaseAddress(JNIEnv
 *env,
-    jobject this, jlong id) {
-  return 0L;
-}
-
-JNIEXPORT
-jlong JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_ninit(JNIEnv
 *env, jclass this,
-    jlong capacity, jstring pathname, jboolean isnew) {
-  pthread_rwlock_wrlock(&g_sysvmem_rwlock);
-  SysVMPool *pool;
-  size_t ret = -1;
-  g_sysvmpool_arr = realloc(g_sysvmpool_arr, (g_sysvmpool_count + 1) * 
sizeof(SysVMPool));
-  if (NULL != g_sysvmpool_arr) {
-    pool = g_sysvmpool_arr + g_sysvmpool_count;
-    ret = g_sysvmpool_count;
-    g_sysvmpool_count++;
-  } else {
-    pthread_rwlock_unlock(&g_sysvmem_rwlock);
-    throw(env, "Out of memory!");
-  }
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  return ret;
-}
-
-JNIEXPORT
-void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_nclose
-(JNIEnv *env, jobject this, jlong id)
-{
-  SysVMPool *pool;
-  pthread_rwlock_wrlock(&g_sysvmem_rwlock);
-  pool = g_sysvmpool_arr + id;
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-}
-
-__attribute__((destructor)) void fini(void) {
-  int i;
-  SysVMPool *pool;
-  pthread_rwlock_wrlock(&g_sysvmem_rwlock);
-  if (NULL != g_sysvmpool_arr) {
-    for (i = 0; i < g_sysvmpool_count; ++i) {
-      pool = g_sysvmpool_arr + i;
-    }
-    free(g_sysvmpool_arr);
-    g_sysvmpool_arr = NULL;
-    g_sysvmpool_count = 0;
-  }
-  pthread_rwlock_unlock(&g_sysvmem_rwlock);
-  pthread_rwlock_destroy(&g_sysvmem_rwlock);
-}

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.h
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.h
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.h
deleted file mode 100644
index 8f84cc3..0000000
--- 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/native/org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl.h
+++ /dev/null
@@ -1,48 +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.
- */
-
-#include <jni.h>
-/* Header for class 
org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl */
-
-#include "common.h"
-
-#ifndef 
_Included_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl
-#define 
_Included_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     
org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl
- * Method:    jniInit
- * Signature: (II)V
- */
-JNIEXPORT void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_jniInit
-(JNIEnv *, jobject, jint, jint);
-
-/*
- * Class:     
org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl
- * Method:    jniTerm
- * Signature: ()V
- */
-JNIEXPORT void JNICALL 
Java_org_apache_mnemonic_service_memoryservice_internal_SysVMemServiceImpl_jniTerm
-(JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService
new file mode 100644
index 0000000..cd1555c
--- /dev/null
+++ 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memory.VolatileMemoryAllocatorService
@@ -0,0 +1 @@
+org.apache.mnemonic.service.memory.internal.SysVMemServiceImpl

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService
----------------------------------------------------------------------
diff --git 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService
 
b/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService
deleted file mode 100644
index c9c3c72..0000000
--- 
a/mnemonic-memory-services/mnemonic-sys-vmem-service/src/main/resources/META-INF/services/org.apache.mnemonic.service.memoryservice.VolatileMemoryAllocatorService
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.mnemonic.service.memoryservice.internal.SysVMemServiceImpl

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/a4bb10eb/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
 
b/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
deleted file mode 100644
index c767604..0000000
--- 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/AttributeInfo.java
+++ /dev/null
@@ -1,62 +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.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-query/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java 
b/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java
deleted file mode 100644
index 5dabeb1..0000000
--- 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/EntityInfo.java
+++ /dev/null
@@ -1,50 +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.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-query/src/main/java/org/apache/mnemonic/query/memory/Queryable.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/Queryable.java 
b/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/Queryable.java
deleted file mode 100644
index d6eb5d6..0000000
--- 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/Queryable.java
+++ /dev/null
@@ -1,115 +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.query.memory;
-
-import org.apache.mnemonic.service.computingservice.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-query/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java 
b/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java
deleted file mode 100644
index 4194ca1..0000000
--- 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/ResultSet.java
+++ /dev/null
@@ -1,43 +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.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-query/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
----------------------------------------------------------------------
diff --git 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java 
b/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
deleted file mode 100644
index 114a881..0000000
--- 
a/mnemonic-query/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
+++ /dev/null
@@ -1,35 +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.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-spark/mnemonic-spark-core/src/test/resources/testng.xml
----------------------------------------------------------------------
diff --git a/mnemonic-spark/mnemonic-spark-core/src/test/resources/testng.xml 
b/mnemonic-spark/mnemonic-spark-core/src/test/resources/testng.xml
index 3dcc372..759a69a 100644
--- a/mnemonic-spark/mnemonic-spark-core/src/test/resources/testng.xml
+++ b/mnemonic-spark/mnemonic-spark-core/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