{ "name": "LongKeyRecordNode", "comment": "LongKeyRecordNode is an abstract implementation of a BTree leaf node\n which utilizes long key values and stores records.\n \n This type of node has the following partial layout within a single DataBuffer\n (field size in bytes):\n \n | NodeType(1) | KeyCount(4) | PrevLeafId(4) | NextLeafId(4) | ...\n ", "javadoc": "\u003ccode\u003eLongKeyRecordNode\u003c/code\u003e is an abstract implementation of a BTree leaf node\n which utilizes long key values and stores records.\n \u003cp\u003e\n This type of node has the following partial layout within a single DataBuffer\n (field size in bytes):\n \u003cpre\u003e\n | NodeType(1) | KeyCount(4) | PrevLeafId(4) | NextLeafId(4) | ...\n \u003c/pre\u003e", "static": false, "implements": [ "db.RecordNode" ], "extends": "db.LongKeyNode", "fields": [ { "name": "ID_SIZE", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "4" }, { "name": "PREV_LEAF_ID_OFFSET", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "5" }, { "name": "NEXT_LEAF_ID_OFFSET", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "9" }, { "name": "RECORD_LEAF_HEADER_SIZE", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "13" } ], "methods": [ { "name": "\u003cinit\u003e", "comment": "Construct an existing long-key record leaf node.", "javadoc": "Construct an existing long-key record leaf node.\n@param nodeMgr table node manager instance\n@param buf node buffer", "static": false, "params": [ { "name": "nodeMgr", "type_long": "db.NodeMgr", "type_short": "NodeMgr", "comment": "table node manager instance" }, { "name": "buf", "type_long": "db.buffers.DataBuffer", "type_short": "DataBuffer", "comment": "node buffer" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [] }, { "name": "\u003cinit\u003e", "comment": "Construct a new long-key record leaf node.", "javadoc": "Construct a new long-key record leaf node.\n@param nodeMgr table node manager instance\n@param nodeType node type\n@param prevLeafId node buffer id for previous leaf - left sibling ( \u0026lt; 0: no leaf)\n@param nextLeafId node buffer id for next leaf - right sibling ( \u0026lt; 0 : no leaf)\n@throws IOException thrown if an IO error occurs", "static": false, "params": [ { "name": "nodeMgr", "type_long": "db.NodeMgr", "type_short": "NodeMgr", "comment": "table node manager instance" }, { "name": "nodeType", "type_long": "byte", "type_short": "byte", "comment": "node type" }, { "name": "prevLeafId", "type_long": "int", "type_short": "int", "comment": "node buffer id for previous leaf - left sibling ( 0: no leaf)" }, { "name": "nextLeafId", "type_long": "int", "type_short": "int", "comment": "node buffer id for next leaf - right sibling ( 0 : no leaf)" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if an IO error occurs" } ] }, { "name": "getParent", "comment": "", "javadoc": "", "static": false, "params": [], "return": { "type_long": "db.LongKeyInteriorNode", "type_short": "LongKeyInteriorNode", "comment": "" }, "throws": [] }, { "name": "logConsistencyError", "comment": "", "javadoc": "", "static": false, "params": [ { "name": "tableName", "type_long": "java.lang.String", "type_short": "String", "comment": "" }, { "name": "msg", "type_long": "java.lang.String", "type_short": "String", "comment": "" }, { "name": "t", "type_long": "java.lang.Throwable", "type_short": "Throwable", "comment": "" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [] }, { "name": "isConsistent", "comment": "", "javadoc": "", "static": false, "params": [ { "name": "tableName", "type_long": "java.lang.String", "type_short": "String", "comment": "" }, { "name": "monitor", "type_long": "ghidra.util.task.TaskMonitor", "type_short": "TaskMonitor", "comment": "" } ], "return": { "type_long": "boolean", "type_short": "boolean", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" }, { "type_long": "ghidra.util.exception.CancelledException", "type_short": "CancelledException", "comment": "" } ] }, { "name": "getLeafNode", "comment": "", "javadoc": "", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "" } ], "return": { "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "getNextLeaf", "comment": "Get this leaf node\u0027s right sibling", "javadoc": "Get this leaf node\u0027s right sibling\n@return this leaf node\u0027s right sibling or null if right sibling does not exist.\n@throws IOException thrown if an IO error occurs", "static": false, "params": [], "return": { "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "this leaf node\u0027s right sibling or null if right sibling does not exist." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if an IO error occurs" } ] }, { "name": "getPreviousLeaf", "comment": "Get this leaf node\u0027s left sibling", "javadoc": "Get this leaf node\u0027s left sibling\n@return this leaf node\u0027s left sibling or null if left sibling does not exist.\n@throws IOException thrown if an IO error occurs", "static": false, "params": [], "return": { "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "this leaf node\u0027s left sibling or null if left sibling does not exist." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if an IO error occurs" } ] }, { "name": "getKeyIndex", "comment": "Perform a binary search to locate the specified key.", "javadoc": "Perform a binary search to locate the specified key.\n@param key key value\n@return int key index if found, else -(key index + 1) indicates insertion\n point.", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "key value" } ], "return": { "type_long": "int", "type_short": "int", "comment": "int key index if found, else -(key index + 1) indicates insertion\n point." }, "throws": [] }, { "name": "getKeyIndex", "comment": "", "javadoc": "", "static": false, "params": [ { "name": "key", "type_long": "db.Field", "type_short": "Field", "comment": "" } ], "return": { "type_long": "int", "type_short": "int", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "split", "comment": "Split this leaf node in half and update tree.\n When a split is performed, the next operation must be performed\n from the root node since the tree may have been restructured.", "javadoc": "Split this leaf node in half and update tree.\n When a split is performed, the next operation must be performed\n from the root node since the tree may have been restructured.\n@return root node which may have changed.\n@throws IOException thrown if an IO error occurs", "static": false, "params": [], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if an IO error occurs" } ] }, { "name": "appendLeaf", "comment": "Append a leaf which contains one or more keys and update tree. Leaf is inserted\n as the new right sibling of this leaf.", "javadoc": "Append a leaf which contains one or more keys and update tree. Leaf is inserted\n as the new right sibling of this leaf.\n@param leaf new right sibling leaf (must be same node type as this leaf)\n@return root node which may have changed.\n@throws IOException thrown if an IO error occurs", "static": false, "params": [ { "name": "leaf", "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "new right sibling leaf (must be same node type as this leaf)" } ], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if an IO error occurs" } ] }, { "name": "removeLeaf", "comment": "Remove this leaf from the tree.", "javadoc": "Remove this leaf from the tree.\n@return root node which may have changed.\n@throws IOException thrown if IO error occurs", "static": false, "params": [], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "splitData", "comment": "Split the contents of this leaf node; placing the right half of the records into the\n empty leaf node provided.", "javadoc": "Split the contents of this leaf node; placing the right half of the records into the\n empty leaf node provided.\n@param newRightLeaf empty right sibling leaf", "static": false, "params": [ { "name": "newRightLeaf", "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "empty right sibling leaf" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [] }, { "name": "createNewLeaf", "comment": "Create a new leaf and add to the node manager.\n The new leaf\u0027s parent is unknown.", "javadoc": "Create a new leaf and add to the node manager.\n The new leaf\u0027s parent is unknown.\n@param prevNodeId node buffer id for previous leaf - left sibling ( \u0026lt; 0: no leaf)\n@param nextNodeId node buffer id for next leaf - right sibling ( \u0026lt; 0 : no leaf)\n@return new leaf node.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "prevNodeId", "type_long": "int", "type_short": "int", "comment": "node buffer id for previous leaf - left sibling ( 0: no leaf)" }, { "name": "nextNodeId", "type_long": "int", "type_short": "int", "comment": "node buffer id for next leaf - right sibling ( 0 : no leaf)" } ], "return": { "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "new leaf node." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "putRecord", "comment": "Insert or Update a record.", "javadoc": "Insert or Update a record.\n@param record data record with long key\n@param table table which will be notified when record is inserted or updated.\n This must be specified when table has indexed columns.\n@return root node which may have changed.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "record", "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "data record with long key" }, { "name": "table", "type_long": "db.Table", "type_short": "Table", "comment": "table which will be notified when record is inserted or updated.\n This must be specified when table has indexed columns." } ], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "appendNewLeaf", "comment": "Append a new leaf and insert the specified record.", "javadoc": "Append a new leaf and insert the specified record.\n@param record data record with long key\n@return root node which may have changed.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "record", "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "data record with long key" } ], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "deleteRecord", "comment": "Delete the record identified by the specified key.", "javadoc": "Delete the record identified by the specified key.\n@param key record key\n@param table table which will be notified when record is deleted.\n@return root node which may have changed.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "record key" }, { "name": "table", "type_long": "db.Table", "type_short": "Table", "comment": "table which will be notified when record is deleted." } ], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "remove", "comment": "Remove the record identified by index.\n This will never be the last record within the node.", "javadoc": "Remove the record identified by index.\n This will never be the last record within the node.\n@param index record index\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "index", "type_long": "int", "type_short": "int", "comment": "record index" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "insertRecord", "comment": "Inserts the record at the given index if there is sufficient space in\n the buffer.", "javadoc": "Inserts the record at the given index if there is sufficient space in\n the buffer.\n@param index insertion index\n@param record record to be inserted\n@return true if the record was successfully inserted.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "index", "type_long": "int", "type_short": "int", "comment": "insertion index" }, { "name": "record", "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "record to be inserted" } ], "return": { "type_long": "boolean", "type_short": "boolean", "comment": "true if the record was successfully inserted." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "updateRecord", "comment": "Updates the record at the given index.", "javadoc": "Updates the record at the given index.\n@param index record index\n@param record new record\n@return root node which may have changed.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "index", "type_long": "int", "type_short": "int", "comment": "record index" }, { "name": "record", "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "new record" } ], "return": { "type_long": "db.LongKeyNode", "type_short": "LongKeyNode", "comment": "root node which may have changed." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getRecord", "comment": "Get the record identified by the specified key.", "javadoc": "Get the record identified by the specified key.\n@param key record key\n@param schema record data schema\n@return Record requested or null if record not found.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "record key" }, { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record data schema" } ], "return": { "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "Record requested or null if record not found." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getRecord", "comment": "Get the record located at the specified index.", "javadoc": "Get the record located at the specified index.\n@param schema record data schema\n@param index key index\n@return Record\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record data schema" }, { "name": "index", "type_long": "int", "type_short": "int", "comment": "key index" } ], "return": { "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "Record" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getRecordBefore", "comment": "Get the first record whose key is less than the specified key.", "javadoc": "Get the first record whose key is less than the specified key.\n@param key record key\n@param schema record data schema\n@return Record requested or null if record not found.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "record key" }, { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record data schema" } ], "return": { "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "Record requested or null if record not found." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getRecordAfter", "comment": "Get the first record whose key is greater than the specified key.", "javadoc": "Get the first record whose key is greater than the specified key.\n@param key record key\n@param schema record data schema\n@return Record requested or null if record not found.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "record key" }, { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record data schema" } ], "return": { "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "Record requested or null if record not found." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getRecordAtOrBefore", "comment": "Get the first record whose key is less than or equal to the specified\n key.", "javadoc": "Get the first record whose key is less than or equal to the specified\n key.\n@param key record key\n@param schema record data schema\n@return Record requested or null if record not found.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "record key" }, { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record data schema" } ], "return": { "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "Record requested or null if record not found." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getRecordAtOrAfter", "comment": "Get the first record whose key is greater than or equal to the specified\n key.", "javadoc": "Get the first record whose key is greater than or equal to the specified\n key.\n@param key record key\n@param schema record data schema\n@return Record requested or null if record not found.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "key", "type_long": "long", "type_short": "long", "comment": "record key" }, { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record data schema" } ], "return": { "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "Record requested or null if record not found." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "createRecordNode", "comment": "Create a new record node with no siblings attached.", "javadoc": "Create a new record node with no siblings attached.\n@param nodeMgr table node manager instance\n@param schema record schema\n@return new record leaf node\n@throws IOException thrown if IO error occurs", "static": true, "params": [ { "name": "nodeMgr", "type_long": "db.NodeMgr", "type_short": "NodeMgr", "comment": "table node manager instance" }, { "name": "schema", "type_long": "db.Schema", "type_short": "Schema", "comment": "record schema" } ], "return": { "type_long": "db.LongKeyRecordNode", "type_short": "LongKeyRecordNode", "comment": "new record leaf node" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] } ] }