aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantListener.java
blob: 59c0a65bc7136bd11313e53aa245fe319056e322 (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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server.tenant;

import com.yahoo.config.provision.TenantName;

/**
 * Interface for something that listens for created and deleted tenants.
 *
 * @author Ulf Lilleengen
 */
public interface TenantListener {
    /**
     * Called whenever a new tenant is created.
     *
     * @param tenant newly created tenant.
     */
    void onTenantCreate(Tenant tenant);

    /**
     * Called whenever a tenant is deleted.
     *
     * @param tenant name of deleted tenant.
     */
    void onTenantDelete(TenantName tenant);

    /**
     * Called when all tenants have been loaded at startup.
     */
    void onTenantsLoaded();
}