|
Public Types |
| enum | Creation_States { ACE_READING = 1,
ACE_WRITING = 2
} |
| enum | Error_Conditions {
ACE_SUCCESS = 0,
ACE_ACCESS_FAILED,
ACE_OPEN_FAILED,
ACE_COPY_FAILED,
ACE_STAT_FAILED,
ACE_MEMMAP_FAILED,
ACE_WRITE_FAILED
} |
Public Methods |
| | ACE_Filecache_Object (const ACE_TCHAR *filename, ACE_SYNCH_RW_MUTEX &lock, LPSECURITY_ATTRIBUTES sa=0, int mapit=1) |
| | Creates a file for reading.
|
| | ACE_Filecache_Object (const ACE_TCHAR *filename, off_t size, ACE_SYNCH_RW_MUTEX &lock, LPSECURITY_ATTRIBUTES sa=0) |
| | Creates a file for writing.
|
| | ~ACE_Filecache_Object (void) |
| | Only if reference count is zero should this be called.
|
| int | acquire (void) |
| | Increment the reference_count_.
|
| int | release (void) |
| | Decrement the reference_count_.
|
| int | error (void) const |
| int | error (int error_value, const ACE_TCHAR *s=ACE_LIB_TEXT("ACE_Filecache_Object")) |
| const ACE_TCHAR * | filename (void) const |
| | filename_ accessor
|
| ACE_HANDLE | handle (void) const |
| | handle_ accessor.
|
| void * | address (void) const |
| | Base memory address for memory mapped file.
|
| off_t | size (void) const |
| | size_ accessor.
|
| int | update (void) const |
| | True if file on disk is newer than cached file.
|
Protected Methods |
| | ACE_Filecache_Object (void) |
| | Prevent from being called.
|
| void | init (void) |
| | Common initialization code,.
|
Private Methods |
| int | error_i (int error_value, const ACE_TCHAR *s=ACE_LIB_TEXT("ACE_Filecache_Object")) |
| | Internal error logging method, no locking.
|
Private Attributes |
| ACE_TCHAR * | tempname_ |
| ACE_TCHAR | filename_ [MAXPATHLEN+1] |
| ACE_Mem_Map | mmap_ |
| | Holds the memory mapped version of the temporary file.
|
| ACE_HANDLE | handle_ |
| | The descriptor to the temporary file.
|
| ACE_stat | stat_ |
| | Used to compare against the real file to test if an update is needed.
|
| off_t | size_ |
| int | action_ |
| | Status indicators.
|
| int | error_ |
| int | stale_ |
| | If set to 1, means the object is flagged for removal.
|
| LPSECURITY_ATTRIBUTES | sa_ |
| | Security attribute object.
|
| ACE_SYNCH_RW_MUTEX | junklock_ |
| | The default initializer.
|
| ACE_SYNCH_RW_MUTEX & | lock_ |
| | Provides a bookkeeping mechanism for users of this object.
|
Friends |
| class | ACE_Filecache |