Public Member Functions | |
virtual void | AllocateIDs (size_t iCount, uint64 &oBaseID, size_t &oCountIssued)=0 |
virtual void | SetTuples (size_t iCount, const uint64 *iIDs, const ZTuple *iTuples)=0 |
virtual void | GetTuples (size_t iCount, const uint64 *iIDs, ZTuple *oTuples)=0 |
virtual void | Search (const ZTBSpec &iSpec, const std::set< uint64 > &iSkipIDs, std::set< uint64 > &oIDs)=0 |
virtual void | Flush () |
virtual ZMutexBase & | GetReadLock ()=0 |
virtual ZMutexBase & | GetWriteLock ()=0 |
ZTuple | GetTuple (uint64 iID) |
void ZTS::AllocateIDs | ( | size_t | iCount, | |
uint64 & | oBaseID, | |||
size_t & | oCountIssued | |||
) | [pure virtual] |
Allocate some number of IDs that have never been allocated before, nor ever will again.
iCount | The count of IDs we'd like to be issued | |
oBaseID | The first ID issued | |
oCountIssued | The count of IDs consecutive to oBaseID that were issused. This will be <= iCount, and may even be zero. If insufficient IDs have been issued, call AllocateIDs again. |
Store the tuples in iTuples at the corresponding IDs in iIDs. The arrays referenced by iIDs and iTuples must each contain at least iCount values.
The ZMutexBase returned by ZTS::GetWriteLock must have been acquired by the current thread.
Take the tuples at the IDs in iIDs and copy them to the corresponding indices in oTuples. The arrays referenced by iIDs and iTuples must each contain at least iCount values.
The ZMutexBase returned by ZTS::GetReadLock must have been acquired by the current thread.
void ZTS::Search | ( | const ZTBSpec & | iSpec, | |
const std::set< uint64 > & | iSkipIDs, | |||
std::set< uint64 > & | oIDs | |||
) | [pure virtual] |
For each entry in the tuplestore whose tuple satisfies iSpec, insert the ID into oIDs (which must be empty), but do not insert any ID which occurs in iSkipIDs.
The ZMutexBase returned by ZTS::GetReadLock must have been acquired by the current thread.
void ZTS::Flush | ( | ) | [virtual] |
Ensure that any data is pushed out to stable storage.
ZMutexBase & ZTS::GetReadLock | ( | ) | [pure virtual] |
Return a ZMutexBase reference to the reader portion of a reader/writer lock.
ZMutexBase & ZTS::GetWriteLock | ( | ) | [pure virtual] |
Return a ZMutexBase reference to the writer portion of a reader/writer lock.
This is simply a helper function that returns the tuple stored at ID iID by calling ZTS::GetTuples. As such the ZMutexBase returned by ZTS::GetReadLock must have been acquired by the current thread.