0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RangeReplayBuffer.cc
Go to the documentation of this file.
1 
22 #include "Common/Compat.h"
23 #include "RangeReplayBuffer.h"
24 
25 using namespace std;
26 using namespace Hypertable;
27 using namespace Hypertable::Property;
28 
30  const uint8_t *ptr = key.ptr;
31  size_t len = Serialization::decode_vi32(&ptr);
32  size_t incr_mem = m_accum.fill();
33  m_accum.add(key.ptr, (ptr-key.ptr)+len);
34  m_accum.add(value.ptr, value.length());
35  incr_mem = m_accum.fill() - incr_mem;
36  return incr_mem;
37 }
38 
39 void RangeReplayBuffer::clear() {
40  m_accum.clear();
41 }
42 
43 
STL namespace.
void add(const Key &key, uint8_t flag, const void *value, uint32_t value_len, TableMutatorAsync *value_index_mutator, TableMutatorAsync *qualifier_index_mutator)
Definition: IndexTables.cc:34
A class managing one or more serializable ByteStrings.
Definition: ByteString.h:47
Compatibility Macros for C/C++.
size_t length() const
Retrieves the length of the serialized string.
Definition: ByteString.h:62
const uint8_t * ptr
The pointer to the serialized data.
Definition: ByteString.h:121
Hypertable definitions
uint32_t decode_vi32(const uint8_t **bufp, size_t *remainp)
Decode a variable length encoded integer up to 32-bit.