-
Notifications
You must be signed in to change notification settings - Fork 75
PlanStore
Author(s): Seungjin Lee
Reviewer(s): Chen Li NOT REVIEWED YET
Implement a plan store for pre-defined plans. It manages plans using a table called plan
and a directory plan_files
. Plan records are stored in the table and the corresponding plan objects are stored as serialized objects under the directory.
As of 12/16/2016: FINISHED
edu.uci.ics.textdb.planstore
https://github.com/TextDB/textdb/issues/256
A table called plan
and a directory plan_files
are used in this module. The table has three attributes; name
, description
and file_path
, all of which are self-explanatory except file_path
. The actual plan object for a given record is serialized as .ser
file and stored where file_path
indicates. This module deals with managing plan records and serializing/deserializing plan object files.
Set of public methods in this module is as follows.
- void getInstance() : get the singleton instance of a plan store.
- void createPlanStore() : create and initialize a plan store.
- void destroyPlanStore() : delete both the table and the directory used in this module.
- IDField addPlan(String planName, String description, LogicalPlan plan) : add a plan with the given name. All the arguments cannot be null.
- ITuple getPlan(String planName) : get a plan record by the given name.
- IDataReader getPlanIterator() : get a plan iterator to retrieve all the plan records stored.
- void deletePlan(String planName) : delete a plan by the given name.
- void updatePlan(String planName, LogicalPlan plan) : update the plan object of a plan by the given name.
- void updatePlan(String planName, String description) : update the description of a plan by the given name.
- void updatePlan(String planName, String description, LogicalPlan plan) : update both the plan object and the description of a plan by the given name
- LogicalPlan readPlanObject(String filePath) : deserialize and fetch a plan object by the given path.
- Integrate this module with
textdb-gui
.