1 #ifndef JOURNAL_H 2 #define JOURNAL_H 3 /* Journal - emulation for the B+Tree torture test 4 ** 5 ** Initial version by Axel Dörfler, axeld@pinc-software.de 6 ** This file may be used under the terms of the OpenBeOS License. 7 */ 8 9 10 #include <stdio.h> 11 12 #include "Volume.h" 13 #include "Debug.h" 14 #include "cache.h" 15 16 17 class Transaction { 18 public: 19 Transaction(Volume *volume,off_t refBlock) 20 : 21 fVolume(volume) 22 { 23 } 24 25 ~Transaction() 26 { 27 } 28 29 status_t WriteBlocks(off_t blockNumber,const uint8 *buffer,size_t numBlocks = 1) 30 { 31 return cached_write(fVolume->Device(),blockNumber,buffer,numBlocks,fVolume->BlockSize()); 32 } 33 34 void Done() 35 { 36 } 37 38 protected: 39 Volume *fVolume; 40 }; 41 42 #endif /* JOURNAL_H */ 43