~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/write_buffer.h

  • Committer: Henrik Ingo
  • Date: 2011-08-29 12:24:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2412.
  • Revision ID: henrik.ingo@avoinelama.fi-20110829122427-bj271mhsl4cq8nv2
Updated README
 - make sure links are up to date
 - add instructions to "apt-get build-dep drizzle" before first build from source

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
#pragma once
32
32
 
33
 
#include <boost/noncopyable.hpp>
34
33
#include <stdint.h>
35
34
#include <vector>
36
35
#include <pthread.h>
37
36
 
38
 
class WriteBuffer : boost::noncopyable
 
37
class WriteBuffer
39
38
{
40
39
public:
41
40
  static const size_t DEFAULT_WRITE_BUFFER_SIZE= 1024; /* Many GPB messages are < 1 KB... */
79
78
    return buffer.size();
80
79
  }
81
80
private:
 
81
  /* Prohibit these */
 
82
  WriteBuffer(const WriteBuffer&);
 
83
  WriteBuffer &operator=(const WriteBuffer&);
 
84
 
82
85
  std::vector<uint8_t> buffer; ///< Raw memory buffer managed by the log
83
86
  pthread_mutex_t latch; ///< Lock around the synchronized parts of the log (the write buffer)
84
87
};