mirror of https://gitee.com/bigwinds/arangodb
updated cleanupCFiles
This commit is contained in:
parent
fe2bd7a813
commit
d6e8046992
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_ARANGOB_FEATURE_H
|
||||
#define APPLICATION_FEATURES_ARANGOB_FEATURE_H 1
|
||||
#ifndef ARANGODB_BENCHMARK_BENCH_FEATURE_H
|
||||
#define ARANGODB_BENCHMARK_BENCH_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOSH_BENCHMARK_BENCHMARK_COUNTER_H
|
||||
#define ARANGOSH_BENCHMARK_BENCHMARK_COUNTER_H 1
|
||||
#ifndef ARANGODB_BENCHMARK_BENCHMARK_COUNTER_H
|
||||
#define ARANGODB_BENCHMARK_BENCHMARK_COUNTER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/Mutex.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOSH_BENCHMARK_BENCHMARK_OPERATION_H
|
||||
#define ARANGOSH_BENCHMARK_BENCHMARK_OPERATION_H 1
|
||||
#ifndef ARANGODB_BENCHMARK_BENCHMARK_OPERATION_H
|
||||
#define ARANGODB_BENCHMARK_BENCHMARK_OPERATION_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "SimpleHttpClient/SimpleHttpClient.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOSH_BENCHMARK_BENCHMARK_THREAD_H
|
||||
#define ARANGOSH_BENCHMARK_BENCHMARK_THREAD_H 1
|
||||
#ifndef ARANGODB_BENCHMARK_BENCHMARK_THREAD_H
|
||||
#define ARANGODB_BENCHMARK_BENCHMARK_THREAD_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_ARANGODUMP_FEATURE_H
|
||||
#define APPLICATION_FEATURES_ARANGODUMP_FEATURE_H 1
|
||||
#ifndef ARANGODB_DUMP_DUMP_FEATURE_H
|
||||
#define ARANGODB_DUMP_DUMP_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
#include "V8Client/ArangoClientHelper.h"
|
||||
|
|
|
@ -79,10 +79,10 @@ void ImportFeature::collectOptions(
|
|||
|
||||
options->addOption("--collection", "collection name",
|
||||
new StringParameter(&_collectionName));
|
||||
|
||||
|
||||
options->addOption("--from-collection-prefix", "_from collection name prefix (will be prepended to all values in '_from')",
|
||||
new StringParameter(&_fromCollectionPrefix));
|
||||
|
||||
|
||||
options->addOption("--to-collection-prefix", "_to collection name prefix (will be prepended to all values in '_to')",
|
||||
new StringParameter(&_toCollectionPrefix));
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_ARANGOIMP_FEATURE_H
|
||||
#define APPLICATION_FEATURES_ARANGOIMP_FEATURE_H 1
|
||||
#ifndef ARANGODB_IMPORT_IMPORT_FEATURE_H
|
||||
#define ARANGODB_IMPORT_IMPORT_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
#include "V8Client/ArangoClientHelper.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOSH_V8_CLIENT_IMPORT_HELPER_H
|
||||
#define ARANGOSH_V8_CLIENT_IMPORT_HELPER_H 1
|
||||
#ifndef ARANGODB_IMPORT_IMPORT_HELPER_H
|
||||
#define ARANGODB_IMPORT_IMPORT_HELPER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
@ -108,7 +108,7 @@ class ImportHelper {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief set collection name prefix for _to
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void setTo (std::string const& to) {
|
||||
_toCollectionPrefix = to;
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_ARANGORESTORE_FEATURE_H
|
||||
#define APPLICATION_FEATURES_ARANGORESTORE_FEATURE_H 1
|
||||
#ifndef ARANGODB_RESTORE_RESTORE_FEATURE_H
|
||||
#define ARANGODB_RESTORE_RESTORE_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_ARANGOSH_FEATURE_H
|
||||
#define APPLICATION_FEATURES_ARANGOSH_FEATURE_H 1
|
||||
#ifndef ARANGODB_SHELL_SHELL_FEATURE_H
|
||||
#define ARANGODB_SHELL_SHELL_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H
|
||||
#define ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H 1
|
||||
#ifndef ARANGODB_SHELL_V8CLIENT_CONNECTION_H
|
||||
#define ARANGODB_SHELL_V8CLIENT_CONNECTION_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ void V8ShellFeature::start() {
|
|||
|
||||
void V8ShellFeature::stop() {
|
||||
LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop";
|
||||
|
||||
|
||||
{
|
||||
v8::Locker locker{_isolate};
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SHELL_V8_SHELL_FEATURE_H
|
||||
#define SHELL_V8_SHELL_FEATURE_H 1
|
||||
#ifndef ARANGODB_SHELL_V8SHELL_FEATURE_H
|
||||
#define ARANGODB_SHELL_V8SHELL_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_ARANGO_CLIENT_HELPER_H
|
||||
#define APPLICATION_FEATURES_ARANGO_CLIENT_HELPER_H 1
|
||||
#ifndef ARANGODB_V8CLIENT_ARANGO_CLIENT_HELPER_H
|
||||
#define ARANGODB_V8CLIENT_ARANGO_CLIENT_HELPER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_APPLICATION_FEATURE_H
|
||||
#define APPLICATION_FEATURES_APPLICATION_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_APPLICATION_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_APPLICATION_FEATURE_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
@ -61,7 +61,7 @@ class ApplicationFeature {
|
|||
// ignored and no methods apart from `collectOptions` will be called for the
|
||||
// feature
|
||||
void disable() { setEnabled(false); }
|
||||
|
||||
|
||||
// disable the feature, and perform no checks if it's optional
|
||||
void forceDisable() { _enabled = false; }
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ void ApplicationServer::disableFeatures(std::vector<std::string> const& names) {
|
|||
void ApplicationServer::forceDisableFeatures(std::vector<std::string> const& names) {
|
||||
disableFeatures(names, true);
|
||||
}
|
||||
|
||||
|
||||
void ApplicationServer::disableFeatures(std::vector<std::string> const& names, bool force) {
|
||||
for (auto const& name : names) {
|
||||
auto feature = ApplicationServer::lookupFeature(name);
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_APPLICATION_SERVER_H
|
||||
#define APPLICATION_FEATURES_APPLICATION_SERVER_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_APPLICATION_SERVER_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_APPLICATION_SERVER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
@ -93,8 +93,8 @@ class ApplicationServer {
|
|||
public:
|
||||
static ApplicationServer* server;
|
||||
static ApplicationFeature* lookupFeature(std::string const&);
|
||||
|
||||
template<typename T>
|
||||
|
||||
template<typename T>
|
||||
static T* getFeature(std::string const& name) {
|
||||
T* feature = dynamic_cast<T*>(application_features::ApplicationServer::lookupFeature(name));
|
||||
if (feature == nullptr) {
|
||||
|
@ -102,7 +102,7 @@ class ApplicationServer {
|
|||
}
|
||||
return feature;
|
||||
}
|
||||
|
||||
|
||||
static void disableFeatures(std::vector<std::string> const&);
|
||||
static void forceDisableFeatures(std::vector<std::string> const&);
|
||||
|
||||
|
@ -152,7 +152,7 @@ class ApplicationServer {
|
|||
static void throwFeatureNotFoundException(std::string const& name);
|
||||
|
||||
static void disableFeatures(std::vector<std::string> const& names, bool force);
|
||||
|
||||
|
||||
// fail and abort with the specified message
|
||||
void fail(std::string const& message);
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_CLIENT_FEATURE_H
|
||||
#define APPLICATION_FEATURES_CLIENT_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_CLIENT_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_CLIENT_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
#include "ApplicationFeatures/HttpEndpointProvider.h"
|
||||
|
|
|
@ -70,7 +70,7 @@ void ConfigFeature::loadOptions(std::shared_ptr<ProgramOptions> options) {
|
|||
LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::loadOptions";
|
||||
|
||||
loadConfigFile(options);
|
||||
|
||||
|
||||
if (_checkConfiguration) {
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_CONFIG_FEATURE_H
|
||||
#define APPLICATION_FEATURES_CONFIG_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_CONFIG_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_CONFIG_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
@ -43,7 +43,7 @@ class ConfigFeature final : public application_features::ApplicationFeature {
|
|||
|
||||
private:
|
||||
void loadConfigFile(std::shared_ptr<options::ProgramOptions>);
|
||||
|
||||
|
||||
private:
|
||||
std::string _progname;
|
||||
};
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_CONSOLE_FEATURE_H
|
||||
#define APPLICATION_FEATURES_CONSOLE_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_CONSOLE_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_CONSOLE_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_DAEMON_FEATURE_H
|
||||
#define APPLICATION_FEATURES_DAEMON_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_DAEMON_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_DAEMON_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H
|
||||
#define APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_HTTP_ENDPOINT_PROVIDER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_LANGUAGE_FEATURE_H
|
||||
#define APPLICATION_FEATURES_LANGUAGE_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_LANGUAGE_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_LANGUAGE_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGOD_CLUSTER_FILE_NONCE_FEATURE_H
|
||||
#define ARANGOD_CLUSTER_FILE_NONCE_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_NONCE_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_NONCE_FEATURE_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "PrivilegeFeature.h"
|
||||
|
||||
//YYY #warning FRANK TODO
|
||||
//YYY #warning FRANK TODO
|
||||
#if 0
|
||||
|
||||
SslFeature::SslFeature(application_features::ApplicationServer* server)
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_PRIVILEGE_FEATURE_H
|
||||
#define APPLICATION_FEATURES_PRIVILEGE_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_PRIVILEGE_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_PRIVILEGE_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_SHUTDOWN_FEATURE_H
|
||||
#define APPLICATION_FEATURES_SHUTDOWN_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_SHUTDOWN_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_SHUTDOWN_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_SSL_FEATURE_H
|
||||
#define APPLICATION_FEATURES_SSL_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_SSL_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_SSL_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
@ -40,7 +40,7 @@ class SslFeature final : public application_features::ApplicationFeature {
|
|||
|
||||
public:
|
||||
SSL_CTX* sslContext() const { return _sslContext; }
|
||||
|
||||
|
||||
public:
|
||||
std::string _cafile;
|
||||
std::string _keyfile;
|
||||
|
@ -49,7 +49,7 @@ class SslFeature final : public application_features::ApplicationFeature {
|
|||
uint64_t _protocol;
|
||||
uint64_t _options;
|
||||
std::string _ecdhCurve;
|
||||
|
||||
|
||||
private:
|
||||
void createSslContext();
|
||||
std::string stringifySslOptions(uint64_t opts) const;
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_SUPERVISOR_FEATURE_H
|
||||
#define APPLICATION_FEATURES_SUPERVISOR_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_SUPERVISOR_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_SUPERVISOR_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_TEMP_FEATURE_H
|
||||
#define APPLICATION_FEATURES_TEMP_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_TEMP_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_TEMP_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_V8PLATFORM_FEATURE_H
|
||||
#define APPLICATION_FEATURES_V8PLATFORM_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_V8PLATFORM_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_V8PLATFORM_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APPLICATION_FEATURES_WORK_MONITOR_FEATURE_H
|
||||
#define APPLICATION_FEATURES_WOR_KMONITOR_FEATURE_H 1
|
||||
#ifndef ARANGODB_APPLICATION_FEATURES_WORK_MONITOR_FEATURE_H
|
||||
#define ARANGODB_APPLICATION_FEATURES_WORK_MONITOR_FEATURE_H 1
|
||||
|
||||
#include "ApplicationFeatures/ApplicationFeature.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BASICS_ARANGO_GLOBAL_CONTEXT_H
|
||||
#define BASICS_ARANGO_GLOBAL_CONTEXT_H 1
|
||||
#ifndef ARANGODB_BASICS_ARANGO_GLOBAL_CONTEXT_H
|
||||
#define ARANGODB_BASICS_ARANGO_GLOBAL_CONTEXT_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
/// @author Max Neunhoeffer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_ASSOC_MULTI_H
|
||||
#define LIB_BASICS_ASSOC_MULTI_H 1
|
||||
#ifndef ARANGODB_BASICS_ASSOC_MULTI_H
|
||||
#define ARANGODB_BASICS_ASSOC_MULTI_H 1
|
||||
|
||||
// Activate for additional debugging:
|
||||
// #define TRI_CHECK_MULTI_POINTER_HASH 1
|
||||
|
@ -1144,7 +1144,7 @@ class AssocMulti {
|
|||
|
||||
LOG(TRACE) << "resizing index " << cb << ", target size: " << size;
|
||||
|
||||
LOG_TOPIC(TRACE, Logger::PERFORMANCE) <<
|
||||
LOG_TOPIC(TRACE, Logger::PERFORMANCE) <<
|
||||
"index-resize " << cb << ", target size: " << size;
|
||||
|
||||
double start = TRI_microtime();
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
/// @author Michael hackstein
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_ASSOC_UNIQUE_H
|
||||
#define LIB_BASICS_ASSOC_UNIQUE_H 1
|
||||
#ifndef ARANGODB_BASICS_ASSOC_UNIQUE_H
|
||||
#define ARANGODB_BASICS_ASSOC_UNIQUE_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
@ -195,7 +195,7 @@ class AssocUnique {
|
|||
|
||||
double start = TRI_microtime();
|
||||
if (targetSize > NotificationSizeThreshold) {
|
||||
LOG_TOPIC(TRACE, Logger::PERFORMANCE) <<
|
||||
LOG_TOPIC(TRACE, Logger::PERFORMANCE) <<
|
||||
"index-resize " << cb << ", target size: " << targetSize;
|
||||
}
|
||||
|
||||
|
@ -822,7 +822,7 @@ class AssocUnique {
|
|||
|
||||
return old;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief a method to iterate over all elements in the hash. this method
|
||||
/// can NOT be used for deleting elements
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Martin Schoenert
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_ASSOCIATIVE_ARRAY_H
|
||||
#define LIB_BASICS_ASSOCIATIVE_ARRAY_H 1
|
||||
#ifndef ARANGODB_BASICS_ASSOCIATIVE_ARRAY_H
|
||||
#define ARANGODB_BASICS_ASSOCIATIVE_ARRAY_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Michael Hackstein
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_ATTRIBUTE_NAME_PARSER_H
|
||||
#define LIB_BASICS_ATTRIBUTE_NAME_PARSER_H 1
|
||||
#ifndef ARANGODB_BASICS_ATTRIBUTE_NAME_PARSER_H
|
||||
#define ARANGODB_BASICS_ATTRIBUTE_NAME_PARSER_H 1
|
||||
|
||||
#include "Common.h"
|
||||
#include <iosfwd>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_BARRIER_H
|
||||
#define LIB_BASICS_BARRIER_H 1
|
||||
#ifndef ARANGODB_BASICS_BARRIER_H
|
||||
#define ARANGODB_BASICS_BARRIER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/ConditionVariable.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_BLOOM_FILTER_H
|
||||
#define LIB_BASICS_BLOOM_FILTER_H 1
|
||||
#ifndef ARANGODB_BASICS_BLOOM_FILTER_H
|
||||
#define ARANGODB_BASICS_BLOOM_FILTER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/fasthash.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_COMMON_H
|
||||
#define LIB_BASICS_COMMON_H 1
|
||||
#ifndef ARANGODB_BASICS_COMMON_H
|
||||
#define ARANGODB_BASICS_COMMON_H 1
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_CONDITION_LOCKER_H
|
||||
#define LIB_BASICS_CONDITION_LOCKER_H 1
|
||||
#ifndef ARANGODB_BASICS_CONDITION_LOCKER_H
|
||||
#define ARANGODB_BASICS_CONDITION_LOCKER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
|||
|
||||
namespace arangodb {
|
||||
namespace basics {
|
||||
class ConditionVariable;
|
||||
class ConditionVariable;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief condition locker
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_CONDITION_VARIABLE_H
|
||||
#define LIB_BASICS_CONDITION_VARIABLE_H 1
|
||||
#ifndef ARANGODB_BASICS_CONDITION_VARIABLE_H
|
||||
#define ARANGODB_BASICS_CONDITION_VARIABLE_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/locks.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Max Neunhoeffer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_DATA_PROTECTOR_H
|
||||
#define LIB_BASICS_DATA_PROTECTOR_H 1
|
||||
#ifndef ARANGODB_BASICS_DATA_PROTECTOR_H
|
||||
#define ARANGODB_BASICS_DATA_PROTECTOR_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_DEADLOCK_DETECTOR_H
|
||||
#define LIB_BASICS_DEADLOCK_DETECTOR_H 1
|
||||
#ifndef ARANGODB_BASICS_DEADLOCK_DETECTOR_H
|
||||
#define ARANGODB_BASICS_DEADLOCK_DETECTOR_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/Mutex.h"
|
||||
|
@ -388,7 +388,7 @@ class DeadlockDetector {
|
|||
|
||||
if (wasBlockedBefore) {
|
||||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||
auto erased =
|
||||
auto erased =
|
||||
#endif
|
||||
_blocked.erase(tid);
|
||||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Martin Schoenert
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_DICTIONARY_H
|
||||
#define LIB_BASICS_DICTIONARY_H 1
|
||||
#ifndef ARANGODB_BASICS_DICTIONARY_H
|
||||
#define ARANGODB_BASICS_DICTIONARY_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ Exception::Exception(int code, char const* file, int line)
|
|||
_file(file),
|
||||
_line(line),
|
||||
_code(code) {
|
||||
|
||||
|
||||
appendLocation();
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ Exception::Exception(int code, std::string const& errorMessage,
|
|||
Exception::Exception(int code, char const* errorMessage, char const* file,
|
||||
int line)
|
||||
: _errorMessage(errorMessage), _file(file), _line(line), _code(code) {
|
||||
|
||||
|
||||
appendLocation();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_EXCEPTIONS_H
|
||||
#define LIB_BASICS_EXCEPTIONS_H 1
|
||||
#ifndef ARANGODB_BASICS_EXCEPTIONS_H
|
||||
#define ARANGODB_BASICS_EXCEPTIONS_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_FILE_UTILS_H
|
||||
#define LIB_BASICS_FILE_UTILS_H 1
|
||||
#ifndef ARANGODB_BASICS_FILE_UTILS_H
|
||||
#define ARANGODB_BASICS_FILE_UTILS_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/files.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_JSON_HELPER_H
|
||||
#define LIB_BASICS_JSON_HELPER_H 1
|
||||
#ifndef ARANGODB_BASICS_JSON_HELPER_H
|
||||
#define ARANGODB_BASICS_JSON_HELPER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/Exceptions.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MUTEX_H
|
||||
#define LIB_BASICS_MUTEX_H 1
|
||||
#ifndef ARANGODB_BASICS_MUTEX_H
|
||||
#define ARANGODB_BASICS_MUTEX_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MUTEX_LOCKER_H
|
||||
#define LIB_BASICS_MUTEX_LOCKER_H 1
|
||||
#ifndef ARANGODB_BASICS_MUTEX_LOCKER_H
|
||||
#define ARANGODB_BASICS_MUTEX_LOCKER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/Mutex.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_NONCE_H
|
||||
#define LIB_BASICS_NONCE_H 1
|
||||
#ifndef ARANGODB_BASICS_NONCE_H
|
||||
#define ARANGODB_BASICS_NONCE_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_READ_LOCKER_H
|
||||
#define LIB_BASICS_READ_LOCKER_H 1
|
||||
#ifndef ARANGODB_BASICS_READ_LOCKER_H
|
||||
#define ARANGODB_BASICS_READ_LOCKER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/ReadWriteLock.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_READ_UNLOCKER_H
|
||||
#define LIB_BASICS_READ_UNLOCKER_H 1
|
||||
#ifndef ARANGODB_BASICS_READ_UNLOCKER_H
|
||||
#define ARANGODB_BASICS_READ_UNLOCKER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/ReadWriteLock.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_READ_WRITE_LOCK_H
|
||||
#define LIB_BASICS_READ_WRITE_LOCK_H 1
|
||||
#ifndef ARANGODB_BASICS_READ_WRITE_LOCK_H
|
||||
#define ARANGODB_BASICS_READ_WRITE_LOCK_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/locks.h"
|
||||
|
|
|
@ -42,9 +42,9 @@ static void LockError(ReadWriteLockCPP11* lock, int mode) {
|
|||
|
||||
using namespace arangodb::basics;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief locks for writing
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ReadWriteLockCPP11::writeLock() {
|
||||
#ifdef TRI_TRACE_LOCKS
|
||||
|
@ -73,9 +73,9 @@ void ReadWriteLockCPP11::writeLock() {
|
|||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief locks for writing, but only tries
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool ReadWriteLockCPP11::tryWriteLock() {
|
||||
#ifdef TRI_TRACE_LOCKS
|
||||
|
@ -95,9 +95,9 @@ bool ReadWriteLockCPP11::tryWriteLock() {
|
|||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief locks for reading
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ReadWriteLockCPP11::readLock() {
|
||||
#ifdef TRI_TRACE_LOCKS
|
||||
|
@ -127,9 +127,9 @@ void ReadWriteLockCPP11::readLock() {
|
|||
_state += 1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief locks for reading, tries only
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool ReadWriteLockCPP11::tryReadLock() {
|
||||
#ifdef TRI_TRACE_LOCKS
|
||||
|
@ -148,9 +148,9 @@ bool ReadWriteLockCPP11::tryReadLock() {
|
|||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief releases the read-lock or write-lock
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ReadWriteLockCPP11::unlock() {
|
||||
#ifdef TRI_TRACE_LOCKS
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Max Neunhoeffer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_READ_WRITE_LOCK_CPP11_H
|
||||
#define LIB_BASICS_READ_WRITE_LOCK_CPP11_H 1
|
||||
#ifndef ARANGODB_BASICS_READ_WRITE_LOCK_CPP11_H
|
||||
#define ARANGODB_BASICS_READ_WRITE_LOCK_CPP11_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_SCOPE_GUARD_H
|
||||
#define LIB_BASICS_SCOPE_GUARD_H 1
|
||||
#ifndef ARANGODB_BASICS_SCOPE_GUARD_H
|
||||
#define ARANGODB_BASICS_SCOPE_GUARD_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Max Neunhoeffer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_SKIP_LIST_H
|
||||
#define LIB_BASICS_SKIP_LIST_H 1
|
||||
#ifndef ARANGODB_BASICS_SKIP_LIST_H
|
||||
#define ARANGODB_BASICS_SKIP_LIST_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_STRING_BUFFER_H
|
||||
#define LIB_BASICS_STRING_BUFFER_H 1
|
||||
#ifndef ARANGODB_BASICS_STRING_BUFFER_H
|
||||
#define ARANGODB_BASICS_STRING_BUFFER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Logger/Logger.h"
|
||||
|
@ -744,7 +744,7 @@ class StringBuffer {
|
|||
_buffer._current = other->_current;
|
||||
_buffer._len = other->_len;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief make sure the buffer is null-terminated
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Dr. Oreste Costa-Panaia
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_STRING_UTILS_H
|
||||
#define LIB_BASICS_STRING_UTILS_H 1
|
||||
#ifndef ARANGODB_BASICS_STRING_UTILS_H
|
||||
#define ARANGODB_BASICS_STRING_UTILS_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_THREAD_H
|
||||
#define LIB_BASICS_THREAD_H 1
|
||||
#ifndef ARANGODB_BASICS_THREAD_H
|
||||
#define ARANGODB_BASICS_THREAD_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Thread {
|
|||
|
||||
enum class ThreadState { CREATED, STARTED, STOPPING, STOPPED, DETACHED };
|
||||
|
||||
static std::string stringify(ThreadState);
|
||||
static std::string stringify(ThreadState);
|
||||
|
||||
public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_THREAD_POOL_H
|
||||
#define LIB_BASICS_THREAD_POOL_H 1
|
||||
#ifndef ARANGODB_BASICS_THREAD_POOL_H
|
||||
#define ARANGODB_BASICS_THREAD_POOL_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/ConditionLocker.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Michael Hackstein
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_TRAVERSER_H
|
||||
#define LIB_BASICS_TRAVERSER_H 1
|
||||
#ifndef ARANGODB_BASICS_TRAVERSER_H
|
||||
#define ARANGODB_BASICS_TRAVERSER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/Exceptions.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_UTF8_HELPER_H
|
||||
#define LIB_BASICS_UTF8_HELPER_H 1
|
||||
#ifndef ARANGODB_BASICS_UTF8HELPER_H
|
||||
#define ARANGODB_BASICS_UTF8HELPER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ struct SystemAttributeExcludeHandler : public VPackAttributeExcludeHandler {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief static initializer for all VPack values
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void VelocyPackHelper::initialize() {
|
||||
LOG(TRACE) << "initializing vpack";
|
||||
|
||||
|
@ -90,11 +90,11 @@ void VelocyPackHelper::initialize() {
|
|||
// set the attribute translator in the global options
|
||||
VPackOptions::Defaults.attributeTranslator = Translator.get();
|
||||
// VPackOptions::Defaults.unsupportedTypeBehavior = VPackOptions::ConvertUnsupportedType;
|
||||
|
||||
|
||||
// initialize exclude handler for system attributes
|
||||
ExcludeHandler.reset(new SystemAttributeExcludeHandler);
|
||||
}
|
||||
|
||||
|
||||
void VelocyPackHelper::disableAssemblerFunctions() {
|
||||
arangodb::velocypack::disableAssemblerFunctions();
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ static int TypeWeight(VPackSlice const& slice) {
|
|||
case VPackValueType::MinKey:
|
||||
return -99; // must be lowest
|
||||
case VPackValueType::Illegal:
|
||||
return -1;
|
||||
return -1;
|
||||
case VPackValueType::None:
|
||||
case VPackValueType::Null:
|
||||
return 0;
|
||||
|
@ -156,7 +156,7 @@ static int TypeWeight(VPackSlice const& slice) {
|
|||
return 4;
|
||||
case VPackValueType::Object:
|
||||
return 5;
|
||||
case VPackValueType::External:
|
||||
case VPackValueType::External:
|
||||
return TypeWeight(slice.resolveExternal());
|
||||
default:
|
||||
// All other values have equal weight
|
||||
|
@ -291,7 +291,7 @@ TRI_json_t* VelocyPackHelper::velocyPackToJson(VPackSlice const& slice, VPackOpt
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief parses a json file to VelocyPack
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::shared_ptr<VPackBuilder> VelocyPackHelper::velocyPackFromFile(
|
||||
std::string const& path) {
|
||||
|
@ -362,9 +362,9 @@ static bool PrintVelocyPack(int fd, VPackSlice const& slice,
|
|||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief writes a VelocyPack to a file
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool VelocyPackHelper::velocyPackToFile(char const* filename,
|
||||
VPackSlice const& slice,
|
||||
|
@ -462,7 +462,7 @@ int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs,
|
|||
case VPackValueType::Illegal:
|
||||
case VPackValueType::MinKey:
|
||||
case VPackValueType::MaxKey:
|
||||
return 0;
|
||||
return 0;
|
||||
case VPackValueType::None:
|
||||
case VPackValueType::Null:
|
||||
return 0; // null == null;
|
||||
|
@ -483,7 +483,7 @@ int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs,
|
|||
case VPackValueType::SmallInt: {
|
||||
return compareNumberValues(lhs, rhs);
|
||||
}
|
||||
case VPackValueType::Custom:
|
||||
case VPackValueType::Custom:
|
||||
case VPackValueType::String: {
|
||||
std::string lhsString;
|
||||
VPackValueLength nl;
|
||||
|
@ -500,8 +500,8 @@ int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs,
|
|||
left = lhs.getString(nl);
|
||||
}
|
||||
TRI_ASSERT(left != nullptr);
|
||||
|
||||
std::string rhsString;
|
||||
|
||||
std::string rhsString;
|
||||
VPackValueLength nr;
|
||||
char const* right;
|
||||
if (rhs.isCustom()) {
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Michael Hackstein
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_VELOCY_PACK_HELPER_H
|
||||
#define LIB_BASICS_VELOCY_PACK_HELPER_H 1
|
||||
#ifndef ARANGODB_BASICS_VELOCY_PACK_HELPER_H
|
||||
#define ARANGODB_BASICS_VELOCY_PACK_HELPER_H 1
|
||||
|
||||
#include "Basics/JsonHelper.h"
|
||||
#include "Logger/Logger.h"
|
||||
|
@ -50,13 +50,13 @@ class VelocyPackHelper {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief static initializer for all VPack values
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
static void initialize();
|
||||
static void disableAssemblerFunctions();
|
||||
|
||||
|
||||
static arangodb::velocypack::AttributeExcludeHandler* getExcludeHandler();
|
||||
static arangodb::velocypack::AttributeTranslator* getTranslator();
|
||||
|
||||
|
||||
struct VPackHash {
|
||||
size_t operator()(arangodb::velocypack::Slice const&) const;
|
||||
};
|
||||
|
@ -203,15 +203,15 @@ class VelocyPackHelper {
|
|||
/// @brief Compares two VelocyPack number values
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static int compareNumberValues(arangodb::velocypack::Slice lhs,
|
||||
static int compareNumberValues(arangodb::velocypack::Slice lhs,
|
||||
arangodb::velocypack::Slice rhs);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Compares two VelocyPack slices
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static int compare(arangodb::velocypack::Slice lhs,
|
||||
arangodb::velocypack::Slice rhs,
|
||||
static int compare(arangodb::velocypack::Slice lhs,
|
||||
arangodb::velocypack::Slice rhs,
|
||||
bool useUTF8, arangodb::velocypack::Options const* options = &arangodb::velocypack::Options::Defaults,
|
||||
arangodb::velocypack::Slice const* lhsBase = nullptr,
|
||||
arangodb::velocypack::Slice const* rhsBase = nullptr);
|
||||
|
@ -234,31 +234,31 @@ class VelocyPackHelper {
|
|||
static uint64_t hashByAttributes(VPackSlice, std::vector<std::string> const&,
|
||||
bool, int&, std::string const& key = "");
|
||||
|
||||
static inline arangodb::velocypack::Slice NullValue() {
|
||||
return arangodb::velocypack::Slice::nullSlice();
|
||||
static inline arangodb::velocypack::Slice NullValue() {
|
||||
return arangodb::velocypack::Slice::nullSlice();
|
||||
}
|
||||
|
||||
static inline arangodb::velocypack::Slice TrueValue() {
|
||||
return arangodb::velocypack::Slice::trueSlice();
|
||||
return arangodb::velocypack::Slice::trueSlice();
|
||||
}
|
||||
|
||||
static inline arangodb::velocypack::Slice FalseValue() {
|
||||
return arangodb::velocypack::Slice::falseSlice();
|
||||
return arangodb::velocypack::Slice::falseSlice();
|
||||
}
|
||||
|
||||
static inline arangodb::velocypack::Slice BooleanValue(bool value) {
|
||||
if (value) {
|
||||
return arangodb::velocypack::Slice::trueSlice();
|
||||
return arangodb::velocypack::Slice::trueSlice();
|
||||
}
|
||||
return arangodb::velocypack::Slice::falseSlice();
|
||||
return arangodb::velocypack::Slice::falseSlice();
|
||||
}
|
||||
|
||||
static inline arangodb::velocypack::Slice EmptyArrayValue() {
|
||||
return arangodb::velocypack::Slice::emptyArraySlice();
|
||||
return arangodb::velocypack::Slice::emptyArraySlice();
|
||||
}
|
||||
|
||||
static inline arangodb::velocypack::Slice EmptyObjectValue() {
|
||||
return arangodb::velocypack::Slice::emptyObjectSlice();
|
||||
return arangodb::velocypack::Slice::emptyObjectSlice();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -267,7 +267,7 @@ class VelocyPackHelper {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static inline arangodb::velocypack::Slice IllegalValue() {
|
||||
return arangodb::velocypack::Slice::illegalSlice();
|
||||
return arangodb::velocypack::Slice::illegalSlice();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGODB_UTILS_WORK_DESCRIPTION
|
||||
#define ARANGODB_UTILS_WORK_DESCRIPTION 1
|
||||
#ifndef ARANGODB_BASICS_WORK_DESCRIPTION_H
|
||||
#define ARANGODB_BASICS_WORK_DESCRIPTION_H 1
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGODB_UTILS_WORK_ITEM
|
||||
#define ARANGODB_UTILS_WORK_ITEM 1
|
||||
#ifndef ARANGODB_BASICS_WORK_ITEM_H
|
||||
#define ARANGODB_BASICS_WORK_ITEM_H 1
|
||||
|
||||
namespace arangodb {
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ bool WorkMonitor::pushThread(Thread* thread) {
|
|||
if (WORK_MONITOR_STOPPED.load()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
TRI_ASSERT(thread != nullptr);
|
||||
TRI_ASSERT(Thread::CURRENT_THREAD == nullptr);
|
||||
Thread::CURRENT_THREAD = thread;
|
||||
|
@ -163,7 +163,7 @@ void WorkMonitor::popThread(Thread* thread) {
|
|||
if (WORK_MONITOR_STOPPED.load()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
TRI_ASSERT(thread != nullptr);
|
||||
WorkDescription* desc = deactivateWorkDescription();
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef ARANGODB_UTILS_WORK_MONITOR
|
||||
#define ARANGODB_UTILS_WORK_MONITOR 1
|
||||
#ifndef ARANGODB_BASICS_WORK_MONITOR_H
|
||||
#define ARANGODB_BASICS_WORK_MONITOR_H 1
|
||||
|
||||
#include "Basics/Thread.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_WORKER_THREAD_H
|
||||
#define LIB_BASICS_WORKER_THREAD_H 1
|
||||
#ifndef ARANGODB_BASICS_WORKER_THREAD_H
|
||||
#define ARANGODB_BASICS_WORKER_THREAD_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/Thread.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_WRITE_LOCKER_H
|
||||
#define LIB_BASICS_WRITE_LOCKER_H 1
|
||||
#ifndef ARANGODB_BASICS_WRITE_LOCKER_H
|
||||
#define ARANGODB_BASICS_WRITE_LOCKER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/ReadWriteLock.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author Achim Brandt
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_WRITE_UNLOCKER_H
|
||||
#define LIB_BASICS_WRITE_UNLOCKER_H 1
|
||||
#ifndef ARANGODB_BASICS_WRITE_UNLOCKER_H
|
||||
#define ARANGODB_BASICS_WRITE_UNLOCKER_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/ReadWriteLock.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Oreste Costa-Panaia
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_APPLICATION_EXIT_H
|
||||
#define LIB_BASICS_APPLICATION_EXIT_H 1
|
||||
#ifndef ARANGODB_BASICS_APPLICATION__EXIT_H
|
||||
#define ARANGODB_BASICS_APPLICATION__EXIT_H 1
|
||||
|
||||
#ifndef TRI_WITHIN_COMMON
|
||||
#error use <Basics/Common.h>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_CONVERSIONS_H
|
||||
#define LIB_BASICS_CONVERSIONS_H 1
|
||||
#ifndef ARANGODB_BASICS_CONVERSIONS_H
|
||||
#define ARANGODB_BASICS_CONVERSIONS_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_CSV_H
|
||||
#define LIB_BASICS_CSV_H 1
|
||||
#ifndef ARANGODB_BASICS_CSV_H
|
||||
#define ARANGODB_BASICS_CSV_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_DEBUGGING_H
|
||||
#define LIB_BASICS_DEBUGGING_H 1
|
||||
#ifndef ARANGODB_BASICS_DEBUGGING_H
|
||||
#define ARANGODB_BASICS_DEBUGGING_H 1
|
||||
|
||||
#ifndef TRI_WITHIN_COMMON
|
||||
#error use <Basics/Common.h>
|
||||
|
|
|
@ -86,7 +86,7 @@ int TRI_errno() {
|
|||
|
||||
if (eptr == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return eptr->_number;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_ERROR_H
|
||||
#define LIB_BASICS_ERROR_H 1
|
||||
#ifndef ARANGODB_BASICS_ERROR_H
|
||||
#define ARANGODB_BASICS_ERROR_H 1
|
||||
|
||||
#ifndef TRI_WITHIN_COMMON
|
||||
#error use <Basics/Common.h>
|
||||
|
|
|
@ -210,7 +210,7 @@ static void ListTreeRecursively(char const* full, char const* path,
|
|||
|
||||
for (size_t j = 0; j < 2; ++j) {
|
||||
for (auto const& filename : dirs) {
|
||||
std::string const newFull = arangodb::basics::FileUtils::buildFilename(full, filename);
|
||||
std::string const newFull = arangodb::basics::FileUtils::buildFilename(full, filename);
|
||||
std::string newPath;
|
||||
|
||||
if (*path) {
|
||||
|
@ -1140,7 +1140,7 @@ int TRI_CreateLockFile(char const* filename) {
|
|||
}
|
||||
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, buf);
|
||||
|
||||
|
||||
struct flock lock;
|
||||
|
||||
lock.l_start = 0;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_FILES_H
|
||||
#define LIB_BASICS_FILES_H 1
|
||||
#ifndef ARANGODB_BASICS_FILES_H
|
||||
#define ARANGODB_BASICS_FILES_H 1
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Basics/win-utils.h"
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
/// @author http://en.wikipedia.org/wiki/Binary_GCD_algorithm
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_GCD_H
|
||||
#define LIB_BASICS_GCD_H 1
|
||||
#ifndef ARANGODB_BASICS_GCD_H
|
||||
#define ARANGODB_BASICS_GCD_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_HASHES_H
|
||||
#define LIB_BASICS_HASHES_H 1
|
||||
#ifndef ARANGODB_BASICS_HASHES_H
|
||||
#define ARANGODB_BASICS_HASHES_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jan Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_JSON_UTILITIES_H
|
||||
#define LIB_BASICS_JSON_UTILITIES_H 1
|
||||
#ifndef ARANGODB_BASICS_JSON__UTILITIES_H
|
||||
#define ARANGODB_BASICS_JSON__UTILITIES_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/json.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_JSON_H
|
||||
#define LIB_BASICS_JSON_H 1
|
||||
#ifndef ARANGODB_BASICS_JSON_H
|
||||
#define ARANGODB_BASICS_JSON_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/vector.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Jen Steemann
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_LEVENSHTEIN_H
|
||||
#define LIB_BASICS_LEVENSHTEIN_H 1
|
||||
#ifndef ARANGODB_BASICS_LEVENSHTEIN_H
|
||||
#define ARANGODB_BASICS_LEVENSHTEIN_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2014 ArangoDB GmbH, Cologne, Germany
|
||||
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
|
||||
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -29,8 +29,8 @@
|
|||
/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_LOCAL_CONFIGURATION_WIN_H
|
||||
#define LIB_BASICS_LOCAL_CONFIGURATION_WIN_H 1
|
||||
#ifndef ARANGODB_BASICS_LOCAL__CONFIGURATION__WIN_H
|
||||
#define ARANGODB_BASICS_LOCAL__CONFIGURATION__WIN_H 1
|
||||
|
||||
#ifndef TRI_WITHIN_COMMON
|
||||
#error use <Basics/Common.h>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_LOCKS_POSIX_H
|
||||
#define LIB_BASICS_LOCKS_POSIX_H 1
|
||||
#ifndef ARANGODB_BASICS_LOCKS__POSIX_H
|
||||
#define ARANGODB_BASICS_LOCKS__POSIX_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_LOCKS_WIN32_H
|
||||
#define LIB_BASICS_LOCKS_WIN32_H 1
|
||||
#ifndef ARANGODB_BASICS_LOCKS__WIN32_H
|
||||
#define ARANGODB_BASICS_LOCKS__WIN32_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_LOCKS_H
|
||||
#define LIB_BASICS_LOCKS_H 1
|
||||
#ifndef ARANGODB_BASICS_LOCKS_H
|
||||
#define ARANGODB_BASICS_LOCKS_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MAKE_UNIQUE_H
|
||||
#define LIB_BASICS_MAKE_UNIQUE_H 1
|
||||
#ifndef ARANGODB_BASICS_MAKE__UNIQUE_H
|
||||
#define ARANGODB_BASICS_MAKE__UNIQUE_H 1
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
|
|
@ -95,7 +95,7 @@ int TRI_MMFile(void* memoryAddress, size_t numOfBytesToInitialize,
|
|||
|
||||
if (errno == ENOMEM) {
|
||||
LOG_TOPIC(DEBUG, Logger::MMAP) << "out of memory in mmap";
|
||||
|
||||
|
||||
return TRI_ERROR_OUT_OF_MEMORY_MMAP;
|
||||
}
|
||||
|
||||
|
@ -156,13 +156,13 @@ int TRI_ProtectMMFile(void* memoryAddress, size_t numOfBytesToProtect,
|
|||
int TRI_MMFileAdvise(void* memoryAddress, size_t numOfBytes, int advice) {
|
||||
#ifdef __linux__
|
||||
LOG_TOPIC(TRACE, Logger::MMAP) << "madvise " << advice << " for range " << Logger::RANGE(memoryAddress, numOfBytes);
|
||||
|
||||
|
||||
int res = madvise(memoryAddress, numOfBytes, advice);
|
||||
|
||||
if (res == 0) {
|
||||
return TRI_ERROR_NO_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
char buffer[256];
|
||||
char* p = strerror_r(errno, buffer, 256);
|
||||
LOG_TOPIC(ERR, Logger::MMAP) << "madvise " << advice << " for range " << Logger::RANGE(memoryAddress, numOfBytes) << " failed with: " << p << " ";
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Oreste Costa-Panaia
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MEMORY_MAP_POSIX_H
|
||||
#define LIB_BASICS_MEMORY_MAP_POSIX_H 1
|
||||
#ifndef ARANGODB_BASICS_MEMORY__MAP__POSIX_H
|
||||
#define ARANGODB_BASICS_MEMORY__MAP__POSIX_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ int TRI_MMFile(void* memoryAddress, size_t numOfBytesToInitialize,
|
|||
LOG(DEBUG) << "MapViewOfFile failed with error code = " << errorCode;
|
||||
return TRI_ERROR_SYS_ERROR;
|
||||
}
|
||||
|
||||
|
||||
LOG_TOPIC(DEBUG, Logger::MMAP) << "memory-mapped range " << Logger::RANGE(*result, numOfBytesToInitialize) << ", file-descriptor " << fileDescriptor;
|
||||
|
||||
return TRI_ERROR_NO_ERROR;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Oreste Costa-Panaia
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MEMORY_MAP_WIN32_H
|
||||
#define LIB_BASICS_MEMORY_MAP_WIN32_H 1
|
||||
#ifndef ARANGODB_BASICS_MEMORY__MAP__WIN32_H
|
||||
#define ARANGODB_BASICS_MEMORY__MAP__WIN32_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Oreste Costa-Panaia
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MEMORY_MAP_H
|
||||
#define LIB_BASICS_MEMORY_MAP_H 1
|
||||
#ifndef ARANGODB_BASICS_MEMORY__MAP_H
|
||||
#define ARANGODB_BASICS_MEMORY__MAP_H 1
|
||||
|
||||
#include "Basics/Common.h"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
/// @author Dr. Frank Celler
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LIB_BASICS_MEMORY_H
|
||||
#define LIB_BASICS_MEMORY_H 1
|
||||
#ifndef ARANGODB_BASICS_MEMORY_H
|
||||
#define ARANGODB_BASICS_MEMORY_H 1
|
||||
|
||||
#ifndef TRI_WITHIN_COMMON
|
||||
#error use <Basics/Common.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue