aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/uuid_generator.h
blob: afe8de04da078a39ac649757d26e1de57b7047ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/vespalib/stllike/string.h>

namespace storage::distributor {

/**
 * Generator of universally unique identifiers (not actually conforming UUIDs, as these
 * have MSB semantics) that are expected to be effectively collision free.
 */
class UuidGenerator {
public:
    virtual ~UuidGenerator() = default;
    // Returns a string that is guaranteed ASCII-only
    virtual vespalib::string generate_uuid() const = 0;
};

}