summaryrefslogtreecommitdiffstats
path: root/persistence
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-14 22:58:54 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-15 13:12:36 +0100
commit2a85dc3fd5af5c33601cf04ead06c7545fa46d75 (patch)
treef46f355235fd7684a9f8a6bb562797fd985d1180 /persistence
parentd9b45214d28207564329991afe70afc358fe6d12 (diff)
Split in hash_xxx, array, lru, cache ++ in hpp files. To reduce clinon build
Diffstat (limited to 'persistence')
-rw-r--r--persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp15
-rw-r--r--persistence/src/vespa/persistence/dummyimpl/dummypersistence.h11
-rw-r--r--persistence/src/vespa/persistence/spi/context.cpp9
-rw-r--r--persistence/src/vespa/persistence/spi/context.h10
-rw-r--r--persistence/src/vespa/persistence/spi/result.cpp1
5 files changed, 28 insertions, 18 deletions
diff --git a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp
index c088026bc78..c2404e88a7b 100644
--- a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp
+++ b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp
@@ -1,16 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <algorithm>
-#include <vespa/persistence/dummyimpl/dummypersistence.h>
+#include "dummypersistence.h"
#include <vespa/document/select/parser.h>
#include <vespa/document/base/documentid.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/vespalib/util/crc.h>
#include <vespa/vespalib/util/vstringfmt.h>
#include <vespa/document/fieldset/fieldsetrepo.h>
-#include <vespa/vespalib/stllike/hash_set.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vespalib/util/exceptions.h>
+#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/log/log.h>
using std::binary_search;
@@ -22,6 +21,16 @@ namespace storage {
namespace spi {
namespace dummy {
+BucketContent::BucketContent()
+ : _entries(),
+ _gidMap(),
+ _info(),
+ _inUse(false),
+ _outdatedInfo(true),
+ _active(false)
+{ }
+BucketContent::~BucketContent() { }
+
uint32_t
BucketContent::computeEntryChecksum(const BucketEntry& e) const
{
diff --git a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h
index 6a674182443..c1af86d5a77 100644
--- a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h
+++ b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h
@@ -53,14 +53,9 @@ struct BucketContent {
mutable bool _outdatedInfo;
bool _active;
- BucketContent()
- : _entries(),
- _gidMap(),
- _info(),
- _inUse(false),
- _outdatedInfo(true),
- _active(false)
- { }
+ BucketContent();
+ ~BucketContent();
+
uint32_t computeEntryChecksum(const BucketEntry&) const;
BucketChecksum updateRollingChecksum(uint32_t entryChecksum);
diff --git a/persistence/src/vespa/persistence/spi/context.cpp b/persistence/src/vespa/persistence/spi/context.cpp
index dc84aaf0e34..aba054a9814 100644
--- a/persistence/src/vespa/persistence/spi/context.cpp
+++ b/persistence/src/vespa/persistence/spi/context.cpp
@@ -5,5 +5,14 @@
namespace storage {
namespace spi {
+Context::Context(const LoadType& loadType, Priority pri, int maxTraceLevel)
+ : _loadType(&loadType),
+ _priority(pri),
+ _trace(maxTraceLevel),
+ _readConsistency(ReadConsistency::STRONG)
+{ }
+
+Context::~Context() { }
+
} // spi
} // storage
diff --git a/persistence/src/vespa/persistence/spi/context.h b/persistence/src/vespa/persistence/spi/context.h
index 6758355515f..ac4889da4bb 100644
--- a/persistence/src/vespa/persistence/spi/context.h
+++ b/persistence/src/vespa/persistence/spi/context.h
@@ -57,12 +57,10 @@ class Context {
ReadConsistency _readConsistency;
public:
- Context(const LoadType& loadType, Priority pri, int maxTraceLevel)
- : _loadType(&loadType),
- _priority(pri),
- _trace(maxTraceLevel),
- _readConsistency(ReadConsistency::STRONG)
- { }
+ Context(Context &&) = default;
+ Context & operator = (Context &&) = default;
+ Context(const LoadType& loadType, Priority pri, int maxTraceLevel);
+ ~Context();
const LoadType& getLoadType() const { return *_loadType; }
Priority getPriority() const { return _priority; }
diff --git a/persistence/src/vespa/persistence/spi/result.cpp b/persistence/src/vespa/persistence/spi/result.cpp
index 4d86fc01212..511a73134f0 100644
--- a/persistence/src/vespa/persistence/spi/result.cpp
+++ b/persistence/src/vespa/persistence/spi/result.cpp
@@ -4,7 +4,6 @@
#include <vespa/document/fieldvalue/document.h>
#include <vespa/vespalib/stllike/asciistream.h>
-
namespace storage {
namespace spi {