aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.h
blob: 7f0873a750ddbee0a67cf8648eab66d2b0aeae30 (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
28
29
30
31
32
33
34
35
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/net/state_explorer.h>

namespace vespalib { class SyncableThreadExecutor; }

namespace proton {

/**
 * Class used to explore the shared thread pools used by proton and it's document databases.
 */
class ProtonThreadPoolsExplorer : public vespalib::StateExplorer {
private:
    const vespalib::SyncableThreadExecutor* _shared;
    const vespalib::SyncableThreadExecutor* _match;
    const vespalib::SyncableThreadExecutor* _docsum;
    const vespalib::SyncableThreadExecutor* _flush;
    const vespalib::SyncableThreadExecutor* _proton;
    const vespalib::SyncableThreadExecutor* _warmup;

public:
    ProtonThreadPoolsExplorer(const vespalib::SyncableThreadExecutor* shared,
                              const vespalib::SyncableThreadExecutor* match,
                              const vespalib::SyncableThreadExecutor* docsum,
                              const vespalib::SyncableThreadExecutor* flush,
                              const vespalib::SyncableThreadExecutor* proton,
                              const vespalib::SyncableThreadExecutor* warmup);

    void get_state(const vespalib::slime::Inserter& inserter, bool full) const override;
};

}