#include <BDiskCache.h>
Public Member Functions | |
| BDiskCache (const BDiskCache &cache) | |
| Copy constructor. | |
| BDiskCache (const BString &baseName, UInt32 pageSize) | |
| Constructor. | |
| virtual void | DeleteByteArray (const long id) |
| Deletes the specified entry from the cache. | |
| virtual void | LoadByteArray (const Int32 id, BByteArray &bytes) |
| Loads the requested BByteArray from the cache. | |
| virtual void | StoreByteArray (Int32 &id, const BByteArray &bytes) |
| Stores the specified BByteArray in the cache. | |
| virtual | ~BDiskCache () |
| Destructor. | |
| BDiskCache | ( | const BString & | baseName, | |
| UInt32 | pageSize | |||
| ) |
Constructor.
| baseName | The base name for the cache file. | |
| pageSize | The size of each data page. |
| BDiskCache | ( | const BDiskCache & | cache | ) |
Copy constructor.
This will copy the object and create a new disk cache, with a new file name.
| cache | The BDiskCache to copy. |
| virtual ~BDiskCache | ( | ) | [virtual] |
Destructor.
| virtual void DeleteByteArray | ( | const long | id | ) | [virtual] |
Deletes the specified entry from the cache.
| id | The identifier of the object to be deleted. |
| virtual void LoadByteArray | ( | const Int32 | id, | |
| BByteArray & | bytes | |||
| ) | [virtual] |
Loads the requested BByteArray from the cache.
| id | The identifier for the cached object. | |
| bytes | A variable in which to store the data. |
| virtual void StoreByteArray | ( | Int32 & | id, | |
| const BByteArray & | bytes | |||
| ) | [virtual] |
Stores the specified BByteArray in the cache.
| id | The identifier for the cached object. Use NEW_CACHE_PAGE to specify a new object. Use an existing ID value to replace the associated object in the cache. | |
| bytes | The data to be stored in the cache. |