aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/util/feed_reject_helper.h
blob: 1f7a970b516b3398db13ebc857bddafeea34edb5 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

namespace document {

class FieldValue;
class DocumentUpdate;
class ValueUpdate;


/**
 * Tells whether an operation should be blocked when resource limits have been reached.
 * It looks at the operation type and also the content if it is an 'update' operation.
 */
class FeedRejectHelper {
public:
    static bool isFixedSizeSingleValue(const FieldValue & fv);
    static bool mustReject(const ValueUpdate & valueUpdate);
    static bool mustReject(const DocumentUpdate & documentUpdate);
};

}