aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/main/java/com/yahoo/vespa/config/GenerationCounter.java
blob: b811c3df4d7bfd02f72cb45995a8aebb2967a455 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config;

/**
 * Interface for counters.
 *
 * @author Ulf Lilleengen
 */
public interface GenerationCounter {
    /**
     * Increment counter and return new value.
     *
     * @return incremented counter value.
     */
    long increment();

    /**
     * @return current counter value.
     */
    long get();
}