0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MetaLogDefinitionRangeServer.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 
26 #include "MetaLogEntityRange.h"
29 
30 #include <memory>
31 
32 using namespace Hypertable;
33 using namespace Hypertable::MetaLog;
34 using namespace std;
35 
37  return 3;
38 }
39 
41  return "rsml";
42 }
43 
45 
46  if (header.type == EntityType::RANGE)
47  return make_shared<MetaLogEntityRange>(header);
48  else if (header.type == EntityType::RANGE2)
49  return make_shared<MetaLogEntityRange>(header);
50  else if (header.type == EntityType::TASK_REMOVE_TRANSFER_LOG)
51  return EntityPtr(); // no longer used
53  return make_shared<EntityTaskAcknowledgeRelinquish>(header);
54  else if (header.type == EntityType::REMOVE_OK_LOGS)
55  return make_shared<MetaLogEntityRemoveOkLogs>(header);
56 
58  "Unrecognized type (%d) encountered in rsml",
59  (int)header.type);
60 
61 }
62 
EntityPtr create(const EntityHeader &header) override
Constructs a MetaLog entity from an entity header.
std::shared_ptr< Entity > EntityPtr
Smart pointer to Entity.
Declarations for MetaLogEntityRange.
STL namespace.
Declarations for MetaLogEntityRemoveOkLogs.
const char * name() override
Returns MetaLog definition name.
int32_t type
Entity type defined within the context of a Definition
Compatibility Macros for C/C++.
Hypertable definitions
#define HT_THROWF(_code_, _fmt_,...)
Definition: Error.h:490
uint16_t version() override
Returns version number of definition.
MetaLog framework.
Definition: MetaLog.h:44