blob: 4314acf3c0e4099859b84efc3cf8533f29ad99b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/document/base/documentid.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/persistence/spi/bucket.h>
namespace proton {
/**
* Helper class for creating bucket ids in order to support
* persistence provider spi when getting feed from message bus.
*/
class BucketFactory {
public:
static uint32_t getNumBucketBits() { return 8u; }
static document::BucketId getBucketId(const document::DocumentId &docId);
static storage::spi::Bucket getBucket(const document::DocumentId &docId);
};
} // namespace proton
|