aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java
blob: d0581ec7a4181a3e36113d99ce7d95210a518b7d (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.bundle;

import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import com.google.inject.name.Named;

import java.util.concurrent.CountDownLatch;

/**
 * @author Simon Thoresen Hult
 */
public class MyGuiceModule extends AbstractModule {

    private final CountDownLatch configLatch;

    @Inject
    public MyGuiceModule(@Named("Init") CountDownLatch initLatch,
                         @Named("Config") CountDownLatch configLatch)
    {
        this.configLatch = configLatch;
        initLatch.countDown();
    }

    @Override
    protected void configure() {
        configLatch.countDown();
    }
}