0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
UpdateRequest.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 3
9  * of the License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
26 
27 #ifndef Hypertable_RangeServer_UpdateRequest_h
28 #define Hypertable_RangeServer_UpdateRequest_h
29 
30 #include <AsyncComm/Event.h>
31 
32 #include <Common/StaticBuffer.h>
33 
34 #include <vector>
35 
36 namespace Hypertable {
37 
40 
42  struct SendBackRec {
44  int error;
46  uint32_t count;
48  uint32_t offset;
50  uint32_t len;
51  };
52 
54  class UpdateRequest {
55  public:
59  uint32_t count {};
63  std::vector<SendBackRec> send_back_vector;
65  uint32_t error {};
66  };
67 
69 }
70 
71 #endif // Hypertable_RangeServer_UpdateRequest_h
A memory buffer of static size.
Definition: StaticBuffer.h:45
std::vector< SendBackRec > send_back_vector
Vector of SendBacRec objects describing rejected key/value pairs.
Definition: UpdateRequest.h:63
uint32_t count
Count of serialized key/value pairs in buffer.
Definition: UpdateRequest.h:59
int error
Error code.
Definition: UpdateRequest.h:44
uint32_t offset
Starting byte offset within update buffer of rejected key/value pairs.
Definition: UpdateRequest.h:48
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Definition: Event.h:228
Describes portion of an update buffer rejected due to error.
Definition: UpdateRequest.h:42
Declarations for Event.
StaticBuffer buffer
Update buffer containing serialized key/value pairs.
Definition: UpdateRequest.h:57
uint32_t error
Error code that applies to entire buffer.
Definition: UpdateRequest.h:65
EventPtr event
Event object of originating update requst.
Definition: UpdateRequest.h:61
A memory buffer of static size.
uint32_t len
Length (in bytes) from offset covering key/value pairs rejected.
Definition: UpdateRequest.h:50
Hypertable definitions
uint32_t count
Number of key/value pairs to which error applies.
Definition: UpdateRequest.h:46
Holds client update request and error state.
Definition: UpdateRequest.h:54