aboutsummaryrefslogtreecommitdiffstats
path: root/storageserver/src/vespa/storageserver/app/dummyservicelayerprocess.h
blob: f4e3d386767afd0b4074d2ec5820ee66ad20163d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
 * \class storage::DummyServiceLayerProcess
 *
 * \brief A process running a service layer with dummy persistence provider.
 */
#pragma once

#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <vespa/storageserver/app/servicelayerprocess.h>

namespace storage {

class DummyServiceLayerProcess : public ServiceLayerProcess {
    std::unique_ptr<spi::PersistenceProvider> _provider;

public:
    DummyServiceLayerProcess(const config::ConfigUri & configUri);
    ~DummyServiceLayerProcess() { shutdown(); }

    virtual void shutdown() override;
    virtual void setupProvider() override;
    virtual spi::PersistenceProvider& getProvider() override { return *_provider; }
};

} // storage