#include <Persistent_File_Allocator.h>
Collaboration diagram for TAO_Notify::Persistent_Storage_Block:

Public Member Functions | |
| Persistent_Storage_Block (const size_t block_number, const size_t block_size) | |
| The constructor. Initializes the callback to NULL. | |
| Persistent_Storage_Block (const Persistent_Storage_Block &psb) | |
| The copy constructor. Makes a deep copy of the passed in PSB. | |
| ~Persistent_Storage_Block () | |
| The destructor. | |
| void | set_no_write () |
| bool | get_no_write () |
| Find out whether we have data to be written. | |
| void | set_sync () |
| Set our block to be written as a near-atomic operation. | |
| bool | get_sync () const |
| Find out whether this block should be written near-atomically. | |
| size_t | block_number () const |
| Find out our physical block number. | |
| unsigned char * | data () const |
| Return our data to the user. | |
| void | reassign_data (unsigned char *newptr, bool delete_old=false) |
| Set our data pointer, and optionally delete it. | |
| size_t | detach () |
| Return block number and relinquish ownership. | |
| void | set_callback (Persistent_Callback *callback) |
| Set our callback. | |
| Persistent_Callback * | get_callback () const |
| Get our callback. | |
| void | set_allocator_owns (bool allocator_owns=true) |
| Set ownership of this PSB. | |
| bool | get_allocator_owns () const |
| Get ownership status of this PSB. | |
Private Attributes | |
| unsigned char * | data_ |
| Our raw data. | |
| size_t | block_number_ |
| The block number corresponding to our data. | |
| bool | no_write_ |
| Are we a no-op with just a callback? | |
| bool | sync_ |
| Write in near-atomic fashion. | |
| size_t | block_size_ |
| The size of our block. | |
| Persistent_Callback * | callback_ |
| bool | allocator_owns_ |
| Does the allocator obtain ownership of our block? | |
Contains the raw data to be written on disk as well as positioning information, synchronization information, and a pointer to a callback.
|
||||||||||||
|
The constructor. Initializes the callback to NULL.
|
|
|
The copy constructor. Makes a deep copy of the passed in PSB.
|
|
|
The destructor.
|
|
|
Find out our physical block number.
|
|
|
Return our data to the user.
|
|
|
Return block number and relinquish ownership.
|
|
|
Get ownership status of this PSB.
|
|
|
Get our callback.
|
|
|
Find out whether we have data to be written.
|
|
|
Find out whether this block should be written near-atomically.
|
|
||||||||||||
|
Set our data pointer, and optionally delete it.
|
|
|
Set ownership of this PSB.
|
|
|
Set our callback.
|
|
|
Set our block to not have any data at all - a no-op. This can be used to implement a checkpoint in the write stream. |
|
|
Set our block to be written as a near-atomic operation.
|
|
|
Does the allocator obtain ownership of our block?
|
|
|
The block number corresponding to our data.
|
|
|
The size of our block.
|
|
|
Our optional callback function, to be used in such things as state transitions. |
|
|
Our raw data.
|
|
|
Are we a no-op with just a callback?
|
|
|
Write in near-atomic fashion.
|
1.3.9.1