The wrapper for the SHORE storage manager
![]() | defaultVolId A handle on a "default" volume |
![]() | DeletionQueue A queue used to delete files after a period of time |
![]() | persistentFileId A handle on a "default" persistent file |
![]() | typeFileId A handle on the "default" persistent file which is used only for data types information |
![]() | AbortTrans () Aborts a transaction |
![]() | BeginTrans () Begins a transaction |
![]() | CommitTrans () Commits a transaction |
![]() | CreateDefDevice (const char* FilePath, const int DeviceSize) Creates the default device at the specified location |
![]() | CreateDevice (const char* FilePath, const int DeviceSize, XxxShoreVolumeId& VolId) Creates a device at the specified location |
![]() | CreateFile (const XxxShoreVolumeId& VolumeId, XxxShoreObjectId& File, XxxStoreProperty Property = XXX_SHORE_REGULAR) Creates a new SHORE file |
![]() | CreateTempFile (const XxxShoreVolumeId& VolumeId, XxxShorePhysicalId& FileId) Creates a temporary (unlogged) SHORE file that will be removed when the volume is unmounted |
![]() | DefaultVol () Returns the location of the default volume |
![]() | DeleteFile (const XxxShoreLogicalOID& LogicalOID) Deletes an existing SHORE file |
![]() | DeleteFile (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& File) Deletes an existing SHORE file |
![]() | DeleteFromRootIndex (const XxxShoreVolumeId& VolumeId, const XxxShoreKey& Key, int& NumRemoved) Deletes |
![]() | DeleteRecord (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId) Deletes a record from a file |
![]() | DeleteTempFile (const XxxShorePhysicalId& FileId) Deletes a temporary (unlogged) SHORE file |
![]() | DestroyDevice (const char* FilePath) Dismounts a device, if mounted; then destroys it |
![]() | DeviceExists (const char* FilePath, XxxBool& Found) Determines if a device exists |
![]() | DiskUsage (ostream& OStr) Prints disk usage statistics to the output stream |
![]() | GetAllocateObject (pin_i* Pin, char*& MemoryBuffer, unsigned int& BufferSize, unsigned int StartByte=0, unsigned int Length=0) Gets a pinned object from a file into an internally allocated buffer |
![]() | GetAllocateObject (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, char*& MemoryBuffer, unsigned int& BufferSize, unsigned int StartByte=0, unsigned int Length=0) Gets an object from a file into an internally allocated buffer |
![]() | GetAllocateRecord (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, XxxRecord*& Record) Gets (and allocates) a record from a file |
![]() | GetAllocateRecord (pin_i* Pin, XxxRecord*& Record) Gets (and allocates) a pinned record from a file |
![]() | GetFromRootIndex (const XxxShoreVolumeId& VolumeId, const XxxShoreKey& Key, void *DataBuf, int DataBufSize, bool& Found) Retrieves a |
![]() | GetObjectIterator (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, ObjectIterator*& Iterator) Gets an object/record iterator object (used for large objects) |
![]() | GetObjectPreAlloc (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, char* MemoryBuffer, unsigned int BufferSize, unsigned int StartByte, unsigned int Length) Gets an object from a file into a preallocated buffer |
![]() | GetObjectSize (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& ObjectId, int &Size) Gets the total size (in bytes) of a SHORE object |
![]() | GetStoreProperty (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, XxxStoreProperty& Property) Gets the store property of the file |
![]() | IdToXact (const XxxShoreXactId &XactId, XxxShoreXact *&Xact) Translates a transaction ID to a pointer to the transaction |
![]() | InsertInRootIndex (const XxxShoreVolumeId& VolumeId, const XxxShoreKey& Key, void *Datum, int DatumSize) Inserts a |
![]() | InsertRecord (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, const XxxRecord* Record, XxxShoreObjectId& RecordId) Inserts a record into a file |
![]() | InsertRecord (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, const void* RecordData, size_t RecordSize, XxxShoreObjectId& RecordId) Inserts a record into a file |
![]() | InsertRecordWithId (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, const void* RecordData, size_t RecordSize, const XxxShoreObjectId& RecordId) Inserts a record into a file, allowing the user to specify an OID for the record |
![]() | InsertTempRecord (const XxxShorePhysicalId& FileId, const XxxRecord* Record) Inserts a record into a temporary file |
![]() | LogicalToPhysical (const XxxShoreLogicalOID &OID, XxxShorePhysicalId &PhysId) Converts a SHORE Logical Id into a Physical Id |
![]() | MountDefDevice (const char* FilePath) Mounts the default device |
![]() | MountDevice (const char* FilePath, XxxShoreVolumeId& VolId) Mounts a device at the specified location |
![]() | NumBuffers () Number of buffers allocated |
![]() | PersistentFileId () Returns the location of the default persistent file |
![]() | PinObjectId (const pin_i* Pin) Returns the OID of a pinned object |
![]() | PinValid (pin_i* Pin, lock_mode_t LM) Determines if the supplied pin is valid |
![]() | PrintStats (ostream& OStr) Prints SHORE statistics to the output stream |
![]() | ReplaceRecord (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, const XxxRecord* NewRec) Replaces the contents of a record while retaining the record ID |
![]() | ResetStats () Resets SHORE statistics |
![]() | SetStoreProperty (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, XxxStoreProperty Property) Changes the store property of the file |
![]() | SortFile (const XxxShoreLogicalOID &InputFile, XxxBool DestroyInputFile, XxxShoreLogicalOID &OutputFile, XxxStoreProperty NewFileProp, XxxComparisonFunction Func, const XxxComparisonData *Data, XxxBool Distinct, int RunSize) Sorts a SHORE file, creating a new SHORE file |
![]() | SortFile (const XxxShoreVolumeId &InVolumeId, const XxxShoreObjectId &InFileId, XxxBool DestroyInputFile, XxxShoreVolumeId &OutVolumeId, XxxShoreObjectId &OutFileId, XxxStoreProperty NewFileProp, XxxComparisonFunction Func, const XxxComparisonData *Data, XxxBool Distinct, int RunSize) Sorts a SHORE file, creating a new SHORE file |
![]() | SortPhysicalFile (const XxxShorePhysicalId &InFileId, const XxxShoreVolumeId &VolumeId, XxxShorePhysicalId &OutFileId, XxxComparisonFunction Func, const XxxComparisonData *Data, XxxBool Distinct, int RunSize) Sorts a SHORE temporary file, destroying it and creating a new SHORE file if the input file id is the same as the output file id |
![]() | UnMountDevice (const char* FilePath) Dismounts a device |
![]() | UpdateRecord (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, const int StartByte, const int Length, const char *NewData) Updates a record by replacing a byte region with a new byte region of the same size |
![]() | Valid () Determines if the Storage Manager is up and running |
![]() | WriteToOSFile (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, const char* FileName) Writes the contents of an object to an operating system file |
![]() | WriteToStream (const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, ostream &OStr) Writes the contents of an object to an output stream |
![]() | XactToId (const XxxShoreXact *Xact, XxxShoreXactId &XactId) Translates a transaction to its ID |
![]() | XxxStorageManager (int BufSize) Constructor |
![]() | ~XxxStorageManager () Destructor |
![]() | MIN_NUM_BUFFERS / Lower bound on number of buffers (set to 40) |
![]() | numBuffers / number of buffer pages |
![]() | smOptions Options used in configuring the SHORE storage manager |
![]() | storageManager / A handle on the SHORE storage manager |
![]() | XxxStorageManager::SORT_RUN_SIZE / How long is each sort run? (set to 100) |
![]() | constructSortKeyInfo (XxxComparisonFunction Func, const XxxComparisonData *Data, XxxShoreKeyInfo &ShoreKey) Creates sort key information for a sort predicate |
The wrapper for the SHORE storage manager
static const int XxxStorageManager::SORT_RUN_SIZE
ss_m* storageManager
option_group_t* smOptions
int numBuffers
XxxShoreVolumeId defaultVolId
XxxShoreObjectId persistentFileId
XxxShoreObjectId typeFileId
ShoreFileDeletionQueue DeletionQueue
class ObjectIterator
XxxBool firstAccess
XxxErrCode LogicalToPhysical(const XxxShoreLogicalOID &OID, XxxShorePhysicalId &PhysId)
XxxErrCode CreateFile(const XxxShoreVolumeId& VolumeId, XxxShoreObjectId& File, XxxStoreProperty Property = XXX_SHORE_REGULAR)
FileId - (out) The file ID of the newly created file XxxErrCode CreateTempFile(const XxxShoreVolumeId& VolumeId, XxxShorePhysicalId& FileId)
FileId - (out) The file ID of the newly created file XxxErrCode InsertTempRecord(const XxxShorePhysicalId& FileId, const XxxRecord* Record)
FileId - The file's ID
Record - The record to insert XxxErrCode SortPhysicalFile(const XxxShorePhysicalId &InFileId, const XxxShoreVolumeId &VolumeId, XxxShorePhysicalId &OutFileId, XxxComparisonFunction Func, const XxxComparisonData *Data, XxxBool Distinct, int RunSize)
VolumeId - The output file's volume
OutFileId - The file id of the output file
Func - The comparison function which determines the
relative ordering of tuples
Data - A pointer to the data the comparison function uses
Distinct - Should duplicates be eliminated?
RunSize - The number of buffer pages used for each sorted run XxxErrCode DeleteTempFile(const XxxShorePhysicalId& FileId)
FileId - The file ID of the file XxxErrCode SetStoreProperty(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, XxxStoreProperty Property)
FileId - The file identifier
Property - The desired file property XxxErrCode GetStoreProperty(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, XxxStoreProperty& Property)
FileId - The file identifier
Property - The desired file property XxxErrCode constructSortKeyInfo(XxxComparisonFunction Func, const XxxComparisonData *Data, XxxShoreKeyInfo &ShoreKey)
ShoreKey - (out) The SHORE key information XxxErrCode SortFile(const XxxShoreLogicalOID &InputFile, XxxBool DestroyInputFile, XxxShoreLogicalOID &OutputFile, XxxStoreProperty NewFileProp, XxxComparisonFunction Func, const XxxComparisonData *Data, XxxBool Distinct, int RunSize)
DestroyInputFile - Should the input file be destroyed upon
completion of the sort?
OutputFile - The OID of the output file (created within)
NewFileProp - The file property of the newly-created result file
Func - The comparison function which determines the
relative ordering of tuples
Data - A pointer to the data the comparison function uses
Distinct - Should duplicates be eliminated?
RunSize - The number of buffer pages used for each sorted run XxxErrCode SortFile(const XxxShoreVolumeId &InVolumeId, const XxxShoreObjectId &InFileId, XxxBool DestroyInputFile, XxxShoreVolumeId &OutVolumeId, XxxShoreObjectId &OutFileId, XxxStoreProperty NewFileProp, XxxComparisonFunction Func, const XxxComparisonData *Data, XxxBool Distinct, int RunSize)
InFileId - The file id of the input file
DestroyInputFile - Should the input file be destroyed upon
completion of the sort?
OutVolumeId - The volume id of the output file
OutFileId - The file id of the output file
NewFileProp - The file property of the newly-created result file
Func - The comparison function which determines the
relative ordering of tuples
Data - A pointer to the data the comparison function uses
Distinct - Should duplicates be eliminated?
RunSize - The number of buffer pages used for each sorted run XxxErrCode DeleteFile(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& File)
FileId - The file's ID XxxErrCode DeleteFile(const XxxShoreLogicalOID& LogicalOID)
XxxErrCode InsertInRootIndex(const XxxShoreVolumeId& VolumeId, const XxxShoreKey& Key, void *Datum, int DatumSize)
Key - The key for the pair
Datum - The data for the pair
DatumSize - The size of the data XxxErrCode GetFromRootIndex(const XxxShoreVolumeId& VolumeId, const XxxShoreKey& Key, void *DataBuf, int DataBufSize, bool& Found)
Key - The key for the pair
DataBuf - A pre-allocated buffer for the pair's data
DataBufSize - The size of the data buffer
Found - true if the pair was found XxxErrCode DeleteFromRootIndex(const XxxShoreVolumeId& VolumeId, const XxxShoreKey& Key, int& NumRemoved)
Key - The key for the pair
NumRemoved - (out) The number of entries removed XxxErrCode InsertRecord(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, const XxxRecord* Record, XxxShoreObjectId& RecordId)
FileId - The file's ID
Record - The record to insert
RecordId - (out) The newly assigned OID of the record XxxErrCode GetObjectSize(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& ObjectId, int &Size)
FileId - The object's ID
Size - (out) The size of the object XxxErrCode InsertRecord(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, const void* RecordData, size_t RecordSize, XxxShoreObjectId& RecordId)
FileId - The file's ID
RecordData - The data to insert
RecordSize - The size of that data
RecordId - (out) The newly assigned OID of the record XxxErrCode InsertRecordWithId(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& FileId, const void* RecordData, size_t RecordSize, const XxxShoreObjectId& RecordId)
FileId - The file's ID
RecordData - The data to insert
RecordSize - The size of that data
RecordId - (in) A specified OID to give the record XxxErrCode DeleteRecord(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId)
RecordId - The record's OID XxxErrCode GetObjectPreAlloc(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, char* MemoryBuffer, unsigned int BufferSize, unsigned int StartByte, unsigned int Length)
RecordId - The record's OID
MemoryBuffer - A preallocated buffer of BufferSize bytes
BufferSize - The size of the supplied buffer
StartByte - The starting byte number of the object to fetch
Length - The extent of the object, starting with the start byte
to fetch XxxErrCode GetAllocateObject(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, char*& MemoryBuffer, unsigned int& BufferSize, unsigned int StartByte=0, unsigned int Length=0)
RecordId - The record's OID
MemoryBuffer - (out) A buffer containing the data
BufferSize - (out) The size of the supplied buffer
StartByte - The starting byte number of the object to fetch
Length - The extent of the object, starting with the start byte
to fetch XxxErrCode GetAllocateObject(pin_i* Pin, char*& MemoryBuffer, unsigned int& BufferSize, unsigned int StartByte=0, unsigned int Length=0)
MemoryBuffer - (out) A buffer containing the data
BufferSize - (out) The size of the supplied buffer
StartByte - The starting byte number of the object to fetch
Length - The extent of the object, starting with the start byte
to fetch XxxErrCode GetAllocateRecord(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, XxxRecord*& Record)
RecordId - The record's OID
Record - (out) The newly allocated record. XxxErrCode GetAllocateRecord(pin_i* Pin, XxxRecord*& Record)
Record - (out) The newly allocated record. XxxErrCode UpdateRecord(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, const int StartByte, const int Length, const char *NewData)
RecordId - The record's OID
startByte - The starting byte in the record to replace
length - The length of the replacement
newData - The new data to place in the range XxxErrCode ReplaceRecord(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, const XxxRecord* NewRec)
RecordId - The record's OID
NewRec - The new record to store XxxErrCode WriteToOSFile(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, const char* FileName)
RecordId - The record's OID
FileName - The name of the file to write to XxxErrCode WriteToStream(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, ostream &OStr)
RecordId - The record's OID
OStr - The stream to write to XxxErrCode GetObjectIterator(const XxxShoreVolumeId& VolumeId, const XxxShoreObjectId& RecordId, ObjectIterator*& Iterator)
RecordId - The object's OID XxxStorageManager(int BufSize)
RC - (out) The error code result virtual ~XxxStorageManager()
XxxBool Valid()
int NumBuffers()
XxxShoreVolumeId DefaultVol()
XxxShoreObjectId PersistentFileId()
virtual XxxErrCode BeginTrans()
virtual XxxErrCode CommitTrans()
virtual XxxErrCode AbortTrans()
virtual XxxErrCode CreateDevice(const char* FilePath, const int DeviceSize, XxxShoreVolumeId& VolId)
DeviceSize - The size of the device in KB
VolId - (out) The newly assigned volume ID virtual XxxErrCode CreateDefDevice(const char* FilePath, const int DeviceSize)
DeviceSize - The size of the device in KB virtual XxxErrCode MountDevice(const char* FilePath, XxxShoreVolumeId& VolId)
VolId - (out) The newly assigned volume ID virtual XxxErrCode MountDefDevice(const char* FilePath)
virtual XxxErrCode UnMountDevice(const char* FilePath)
virtual XxxErrCode DestroyDevice(const char* FilePath)
virtual XxxErrCode DeviceExists(const char* FilePath, XxxBool& Found)
Found - (out) XXX_TRUE if the device exists XxxErrCode DiskUsage(ostream& OStr)
XxxErrCode PrintStats(ostream& OStr)
XxxErrCode ResetStats()
static XxxBool PinValid(pin_i* Pin, lock_mode_t LM)
static XxxShoreObjectId PinObjectId(const pin_i* Pin)
XxxErrCode XactToId(const XxxShoreXact *Xact, XxxShoreXactId &XactId)
XactId - The transaction ID of that transaction XxxErrCode IdToXact(const XxxShoreXactId &XactId, XxxShoreXact *&Xact)
XactId - The transaction ID of that transaction
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de