2004-10-12 02:44:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
@file
|
|
|
|
|
2005-01-20 21:19:47 +00:00
|
|
|
Experimental (unreliable) hashtable implementation.
|
|
|
|
|
|
|
|
Instead of using Nested top actions, this hashtable implementation
|
|
|
|
uses carefully ordered redo-operations, and simple recovery code.
|
|
|
|
This reduces the amount of information written to the log, but
|
|
|
|
provides concurrency comparable to that provided by linearHashNTA.
|
|
|
|
|
2004-10-12 02:44:47 +00:00
|
|
|
@ingroup OPERATIONS
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
2005-01-20 21:19:47 +00:00
|
|
|
#ifndef __LINEAR_HASH_H
|
|
|
|
#define __LINEAR_HASH_H
|
2004-10-12 02:44:47 +00:00
|
|
|
|
|
|
|
|
2004-10-18 18:24:54 +00:00
|
|
|
recordid ThashInstantAlloc(int xid, int keySize, int valSize) ;
|
|
|
|
|
|
|
|
void ThashInstantInsert(int xid, recordid hashRid,
|
|
|
|
const void * key, int keySize,
|
|
|
|
const void * val, int valSize);
|
|
|
|
void ThashInstantDelete(int xid, recordid hashRid,
|
2004-10-19 21:16:37 +00:00
|
|
|
const void * key, int keySize, int valSize);
|
2004-10-18 18:24:54 +00:00
|
|
|
void ThashInstantUpdate(int xid, recordid hashRid, const void * key, int keySize, const void * val, int valSize);
|
|
|
|
void TlogicalHashUpdate(int xid, recordid hashRid, void * key, int keySize, void * val, int valSize);
|
|
|
|
void TlogicalHashInsert(int xid, recordid hashRid, void * key, int keySize, void * val, int valSize);
|
|
|
|
int TlogicalHashDelete(int xid, recordid hashRid, void * key, int keySize, void * val, int valSize);
|
2004-10-20 06:21:21 +00:00
|
|
|
int TlogicalHashLookup(int xid, recordid hashRid, void * key, int keySize, void * buf, int valSize);
|
2005-01-14 01:52:53 +00:00
|
|
|
typedef struct {
|
|
|
|
long current_hashBucket;
|
|
|
|
recordid current_rid;
|
|
|
|
} linearHash_iterator;
|
|
|
|
typedef struct {
|
|
|
|
byte * key;
|
|
|
|
byte * value;
|
|
|
|
} linearHash_iteratorPair;
|
|
|
|
|
|
|
|
linearHash_iterator * TlogicalHashIterator(int xid, recordid hashRid);
|
|
|
|
void TlogicalHashIteratorFree(linearHash_iterator * it);
|
|
|
|
linearHash_iteratorPair TlogicalHashIteratorNext(int xid, recordid hashRid, linearHash_iterator * it, int keySize, int valSize);
|
|
|
|
|
|
|
|
|
|
|
|
Operation getLinearInsert();
|
2004-10-18 18:24:54 +00:00
|
|
|
Operation getLinearInsert();
|
|
|
|
Operation getLinearDelete();
|
|
|
|
Operation getUndoLinearInsert();
|
|
|
|
Operation getUndoLinearDelete();
|
|
|
|
|
|
|
|
/*int ThashLookup(int xid, recordid hashRid, void * key, int keySize, void * buf, int valSize);
|
2004-10-17 02:17:00 +00:00
|
|
|
void ThashInit();
|
|
|
|
void ThashDeinit();
|
|
|
|
int ThashOpen(int xid, recordid hashRid);
|
2004-10-18 18:24:54 +00:00
|
|
|
int ThashClose(int xid, recordid hashRid) ; */
|
|
|
|
|
2004-10-12 02:44:47 +00:00
|
|
|
#endif
|