summaryrefslogtreecommitdiffstats
path: root/config-provisioning/src/main/java/com/yahoo/config/provision/zone/RoutingMethod.java
blob: 3a5f136642b113fa7dce2a36f762d72aa674ee4e (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.config.provision.zone;

/**
 * The routing methods supported by a zone.
 *
 * @author mpolden
 */
public enum RoutingMethod {

    /** Routing happens through shared routing layer */
    shared,

    /** Routing happens through a dedicated layer 4 load balancer */
    exclusive,

    /** Routing happens through a shared layer 4 load balancer */
    sharedLayer4;

    /** Returns whether this method routes requests directly to the Vespa container cluster */
    public boolean isDirect() {
        return this == exclusive || this == sharedLayer4;
    }

    /** Returns whether this method routes requests through a shared routing layer */
    public boolean isShared() {
        return this == shared || this == sharedLayer4;
    }

}