aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/main/java/com/yahoo/documentapi/DocumentOpVisitorResponse.java
blob: 97cdf74f06c4a38f8bb975177aa323d8a965aee7 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.documentapi;

import com.yahoo.document.DocumentOperation;

/**
 * Visitor response containing a document operation. All visitor responses have ack
 * tokens that must be acked.
 *
 * @author Arne H Juul
 */
public class DocumentOpVisitorResponse extends VisitorResponse {

    private DocumentOperation op;

    /**
     * Creates visitor response containing a document operation and an ack token.
     *
     * @param op the document operation
     * @param ack the ack token
     */
    public DocumentOpVisitorResponse(DocumentOperation op, AckToken ack) {
        super(ack);
        this.op = op;
    }

    /** @return the document operation */
    public DocumentOperation getDocumentOperation() { return op; }

}