0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TableMutatorAsyncHandler.cc
Go to the documentation of this file.
1 /*
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; version 3 of the
9  * 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 
22 #include <Common/Compat.h>
23 
25 #include "TableMutatorAsync.h"
27 
28 #include <AsyncComm/Protocol.h>
29 
30 #include <Common/Error.h>
31 #include <Common/Logger.h>
32 
33 using namespace Hypertable;
34 using namespace Serialization;
35 
36 
38  uint32_t scatter_buffer) : ApplicationHandler(0),
39  m_mutator(mutator), m_scatter_buffer(scatter_buffer) {
40 }
41 
43  // The scatter buffer will get destroyed when the TableMutator releases it
44  // and this method goes out of scope
47  if (!buffer)
48  HT_FATALF("Unable to locate buffer %d from mutator %p", (int)m_scatter_buffer, (void *)m_mutator);
49  buffer->finish();
50 }
51 
std::shared_ptr< TableMutatorAsyncScatterBuffer > TableMutatorAsyncScatterBufferPtr
Smart pointer to TableMutatorAsyncScatterBuffer.
Provides the ability to mutate a table in the form of adding and deleting rows and cells...
TableMutatorAsyncHandler(TableMutatorAsync *mutator, uint32_t scatter_buffer)
Constructor.
Logging routines and macros.
Compatibility Macros for C/C++.
Hypertable definitions
#define HT_FATALF(msg,...)
Definition: Logger.h:343
TableMutatorAsyncScatterBufferPtr get_outstanding_buffer(size_t id)
Declarations for Protocol.
virtual void run()
Carries out the request.
Base clase for application handlers.
Declarations for TableMutatorAsyncScatterBuffer.
Error codes, Exception handling, error logging.