jhplot.io.db
Class RecordsFile
- java.lang.Object
-
- jhplot.io.db.BaseRecordsFile
-
- jhplot.io.db.RecordsFile
-
public class RecordsFile extends BaseRecordsFile
-
-
Constructor Summary
Constructors Constructor and Description RecordsFile(java.lang.String dbPath, int initialSize)Creates a new database file.RecordsFile(java.lang.String dbPath, java.lang.String accessFlags)Opens an existing database and initializes the in-memory index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Closes the database.java.util.EnumerationenumerateKeys()Returns an enumeration of all the keys in the database.intgetNumRecords()Returns the current number of records in the database.booleanrecordExists(java.lang.String key)Checks if there is a record belonging to the given key.-
Methods inherited from class jhplot.io.db.BaseRecordsFile
deleteRecord, insertRecord, readRecord, updateRecord
-
-
-
-
Constructor Detail
-
RecordsFile
public RecordsFile(java.lang.String dbPath, int initialSize) throws java.io.IOException, RecordsFileExceptionCreates a new database file. The initialSize parameter determines the amount of space which is allocated for the index. The index can grow dynamically, but the parameter is provide to increase efficiency.- Throws:
java.io.IOExceptionRecordsFileException
-
RecordsFile
public RecordsFile(java.lang.String dbPath, java.lang.String accessFlags) throws java.io.IOException, RecordsFileExceptionOpens an existing database and initializes the in-memory index.- Throws:
java.io.IOExceptionRecordsFileException
-
-
Method Detail
-
enumerateKeys
public java.util.Enumeration enumerateKeys()
Returns an enumeration of all the keys in the database.- Specified by:
enumerateKeysin classBaseRecordsFile
-
getNumRecords
public int getNumRecords()
Returns the current number of records in the database.- Specified by:
getNumRecordsin classBaseRecordsFile
-
recordExists
public boolean recordExists(java.lang.String key)
Checks if there is a record belonging to the given key.- Specified by:
recordExistsin classBaseRecordsFile
-
close
public void close() throws java.io.IOException, RecordsFileExceptionCloses the database.- Overrides:
closein classBaseRecordsFile- Throws:
java.io.IOExceptionRecordsFileException
-
-
DMelt 3.0 © DataMelt by jWork.ORG