This is an automated email from the ASF dual-hosted git repository.
katarina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mnemonic.git
The following commit(s) were added to refs/heads/master by this push:
new 5b195a4 MNEMONIC-808: Revamped Memory Service
new cd5c945 Merge pull request #368 from katarinaking/808
5b195a4 is described below
commit 5b195a441b3175b04163fcbac4651f1857f39e64
Author: Katarina <[email protected]>
AuthorDate: Wed Dec 27 03:01:35 2023 +0000
MNEMONIC-808: Revamped Memory Service
---
.../mnemonic/service/memory/QueryableService.java | 171 ++++++++-------------
1 file changed, 68 insertions(+), 103 deletions(-)
diff --git
a/mnemonic-common/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
b/mnemonic-common/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
index 7a527fd..ca32b59 100644
---
a/mnemonic-common/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
+++
b/mnemonic-common/src/main/java/org/apache/mnemonic/service/memory/QueryableService.java
@@ -20,116 +20,81 @@ import org.apache.mnemonic.query.memory.EntityInfo;
import org.apache.mnemonic.query.memory.ResultSet;
import org.apache.mnemonic.service.computing.ValueInfo;
+/**
+ * An interface for interacting with a Queryable Service that manages memory
pools.
+ */
public interface QueryableService {
- /**
- * Retrieve existing class names
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @return an array of class names
- */
- String[] getClassNames(long id);
- /**
- * Retrieve existing entity names according to specified class name
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param clsname
- * specify the class name
- *
- * @return an array of entity names
- */
- String[] getEntityNames(long id, String clsname);
+ /**
+ * Retrieve existing class names in the specified memory pool.
+ *
+ * @param id the identifier of the backed memory pool
+ * @return an array of class names
+ */
+ String[] getClassNames(long id);
- /**
- * retrieve entity info
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param clsname
- * specify a class name
- *
- * @param etyname
- * specify a entity name
- *
- * @return an entity info
- */
- EntityInfo getEntityInfo(long id, String clsname, String etyname);
+ /**
+ * Retrieve existing entity names according to the specified class name in
the given memory pool.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param clsname specify the class name
+ * @return an array of entity names
+ */
+ String[] getEntityNames(long id, String clsname);
- /**
- * create an entity
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param entityinfo
- * specify an entity info to create
- */
- void createEntity(long id, EntityInfo entityinfo);
+ /**
+ * Retrieve entity info for a specific class and entity name in the given
memory pool.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param clsname specify a class name
+ * @param etyname specify an entity name
+ * @return an entity info
+ */
+ EntityInfo getEntityInfo(long id, String clsname, String etyname);
- /**
- * destroy an entity
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param clsname
- * specify a class name
- *
- * @param etyname
- * specify an entity name
- */
- void destroyEntity(long id, String clsname, String etyname);
+ /**
+ * Create an entity in the specified memory pool based on the given entity
info.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param entityinfo specify an entity info to create
+ */
+ void createEntity(long id, EntityInfo entityinfo);
- /**
- * update entity queryable info for a set of durable objects
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param clsname
- * specify a class name
- *
- * @param etyname
- * specify an entity name
- *
- * @param updobjs
- * specify a set of durable objects for update
- */
- void updateQueryableInfo(long id, String clsname, String etyname, ValueInfo
updobjs);
+ /**
+ * Destroy an entity in the specified memory pool based on class and
entity names.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param clsname specify a class name
+ * @param etyname specify an entity name
+ */
+ void destroyEntity(long id, String clsname, String etyname);
- /**
- * delete a set of durable objects
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param clsname
- * specify a class name
- *
- * @param etyname
- * specify an entity name
- *
- * @param updobjs
- * specify a set of durable objects to delete
- */
- void deleteQueryableInfo(long id, String clsname, String etyname, ValueInfo
updobjs);
+ /**
+ * Update queryable info for a set of durable objects associated with a
specific entity.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param clsname specify a class name
+ * @param etyname specify an entity name
+ * @param updobjs specify a set of durable objects for update
+ */
+ void updateQueryableInfo(long id, String clsname, String etyname,
ValueInfo updobjs);
- /**
- * do query using a querying string
- *
- * @param id
- * the identifier of backed memory pool
- *
- * @param querystr
- * specify a query string
- *
- * @return a result set
- */
- ResultSet query(long id, String querystr);
+ /**
+ * Delete a set of durable objects associated with a specific entity.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param clsname specify a class name
+ * @param etyname specify an entity name
+ * @param updobjs specify a set of durable objects to delete
+ */
+ void deleteQueryableInfo(long id, String clsname, String etyname,
ValueInfo updobjs);
+ /**
+ * Perform a query using a querying string in the specified memory pool.
+ *
+ * @param id the identifier of the backed memory pool
+ * @param querystr specify a query string
+ * @return a result set
+ */
+ ResultSet query(long id, String querystr);
}