swap.state File Structure
Collaboration diagram for swap.state File Structure:
Classes | |
class | StoreSwapLogHeader |
Detailed Description
Implementation Notes
- When writing an object to disk, we must first write the meta data. Store::PackSwapMeta() serializes that meta data into a character buffer that we can write.
- Note
- MemObject has a MemObject::swap_hdr_sz. This value is the size of that character buffer; the size of the swap file meta data. The StoreEntry has a member StoreEntry::swap_file_sz that represents the size of the disk file. Thus, the size of the object "content" is Definition: MemObject.h:34Definition: Store.h:42
- The swap file content includes the HTTP reply headers and the HTTP reply body (if any).
- When reading a swap file, Store::Unpack*SwapMeta*() functions iterate over stored swap meta data header fields and also extract the value for MemObject->swap_hdr_sz.