TPIE

11a2c2d
tpie::compressor_buffer_state Struct Reference

The different states of a compressor buffer. More...

#include <tpie/compressed/buffer.h>

Public Types

enum  type { dirty, writing, reading, clean }
 

Detailed Description

The different states of a compressor buffer.

dirty: The buffer is different from the contents on the disk. Only stream may read and write. This is the initial state of a freshly allocated buffer.

writing: The buffer will soon be written to disk. Stream and thread may only read.

reading: The buffer will soon change to reflect the contents on the disk. Only thread may read and write.

clean: The buffer is equal to the contents on the disk. Only stream may read and write.

dirty->writing/reading: When the buffer is sent from stream to thread. writing/reading->clean: When the thread is done. clean->dirty: When the stream has changed the contents of the buffer.

Definition at line 65 of file buffer.h.

Member Enumeration Documentation

◆ type

Enumerator
dirty 

The buffer is different from the contents on the disk.

Only stream may read and write.

writing 

The buffer will soon be written to disk.

Stream and thread may only read.

reading 

The buffer will soon change to reflect the contents on the disk.

Only thread may read and write.

clean 

The buffer is equal to the contents on the disk.

Only stream may read and write.

Definition at line 66 of file buffer.h.

66  {
69  dirty,
72  writing,
75  reading,
78  clean
79  };

The documentation for this struct was generated from the following file:
tpie::compressor_buffer_state::clean
@ clean
The buffer is equal to the contents on the disk.
Definition: buffer.h:78
tpie::compressor_buffer_state::writing
@ writing
The buffer will soon be written to disk.
Definition: buffer.h:72
tpie::compressor_buffer_state::reading
@ reading
The buffer will soon change to reflect the contents on the disk.
Definition: buffer.h:75
tpie::compressor_buffer_state::dirty
@ dirty
The buffer is different from the contents on the disk.
Definition: buffer.h:69