Interface IDiskSchemaManager
-
- All Known Implementing Classes:
AppendOnlyDiskSchemaManager
public interface IDiskSchemaManagerThis class manages IO of id table's schema entry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()close file and free resourcevoiddeleteDiskSchemaEntryByOffset(long offset)delete DiskSchemaEntries on diskjava.util.Collection<DiskSchemaEntry>getAllSchemaEntry()get all disk schema entries from filejava.util.List<DiskSchemaEntry>getDiskSchemaEntriesByOffset(java.util.List<java.lang.Long> offsets)get DiskSchemaEntries from disk filevoidrecover(IDTable idTable)recover id table from log filelongserialize(DiskSchemaEntry schemaEntry)serialize a disk schema entry
-
-
-
Method Detail
-
serialize
long serialize(DiskSchemaEntry schemaEntry)
serialize a disk schema entry- Parameters:
schemaEntry- disk schema entry- Returns:
- disk position of that entry
-
recover
void recover(IDTable idTable)
recover id table from log file- Parameters:
idTable- id table need to be recovered
-
getAllSchemaEntry
java.util.Collection<DiskSchemaEntry> getAllSchemaEntry() throws java.io.IOException
get all disk schema entries from file- Returns:
- collection of all disk schema entires
- Throws:
java.io.IOException
-
getDiskSchemaEntriesByOffset
java.util.List<DiskSchemaEntry> getDiskSchemaEntriesByOffset(java.util.List<java.lang.Long> offsets)
get DiskSchemaEntries from disk file- Parameters:
offsets- the offset of each record on the disk file- Returns:
- DiskSchemaEntries
-
deleteDiskSchemaEntryByOffset
void deleteDiskSchemaEntryByOffset(long offset) throws org.apache.iotdb.commons.exception.MetadataExceptiondelete DiskSchemaEntries on disk- Parameters:
offset- the offset of a record on the disk file- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
close
void close() throws java.io.IOExceptionclose file and free resource- Throws:
java.io.IOException
-
-