aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/errors/OtherMasterException.java
blob: 3c6ea166bd6f5f08b79cdbccfe8f9e22ec8936f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.utils.staterestapi.errors;

public class OtherMasterException extends NotMasterException {
    private final String masterHost;
    private final int masterPort;

    public OtherMasterException(String masterHost, int masterPort) {
        super("Cluster controller not master. Use master at " + masterHost + ":" + masterPort + ".");
        this.masterHost = masterHost;
        this.masterPort = masterPort;
    }

    public String getHost() { return masterHost; }
    public int getPort() { return masterPort; }
}