~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/write_buffer.h

  • Committer: Mark Atwood
  • Date: 2011-08-17 19:14:47 UTC
  • mfrom: (2385.3.17 rf)
  • Revision ID: me@mark.atwood.name-20110817191447-h86yzddvycd0xmof
mergeĀ lp:~olafvdspek/drizzle/refactor6

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