aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/visiting/visitormessagesession.h
blob: 0fefbcb067fc9adebea7f1d2e5ef84958aa0c0ad (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
 * \class storage::VisitorMessageSession
 */
#pragma once

#include <vespa/messagebus/result.h>

namespace documentapi {
    class DocumentMessage;
}

namespace storage {

struct VisitorMessageSession {
    using UP = std::unique_ptr<VisitorMessageSession>;

    virtual ~VisitorMessageSession() {}

    virtual mbus::Result send(std::unique_ptr<documentapi::DocumentMessage>) = 0;

    /** @return Returns the number of pending messages this session has. */
    virtual uint32_t pending() = 0;

};

} // storage