aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/main/java/com/yahoo/vespa/config/GenerationCounter.java
blob: 494d62144573f7579f51c87581331694f2adee1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Yahoo. 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();
}