aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/protect/TimeoutCollector.java
blob: e31716a292e31e847aaa76456979e45a7631928b (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
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.protect;

import com.yahoo.concurrent.ThreadLocalDirectory.Updater;

/**
 * Allocator and glue for sampling timeouts in SearchHandler.
 *
 * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
 * @deprecated this is not in use and will be removed in the next major release
 */
@Deprecated
public final class TimeoutCollector implements Updater<TimeoutRate, Boolean> {

    @Override
    public TimeoutRate createGenerationInstance(TimeoutRate previous) {
        return new TimeoutRate();
    }

    @Override
    public TimeoutRate update(TimeoutRate current, Boolean x) {
        current.addQuery(x);
        return current;
    }

}