All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.config.provision.HostEvent Maven / Gradle / Ivy

There is a newer version: 8.441.21
Show newest version
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;

import java.util.Objects;

/**
 * A maintenance event for a host.
 *
 * @author mpolden
 */
public class HostEvent {

    private final String id;
    private final String hostId;
    private final String description;

    public HostEvent(String id, String hostId, String description) {
        this.id = Objects.requireNonNull(id);
        this.hostId = Objects.requireNonNull(hostId);
        this.description = Objects.requireNonNull(description);
    }

    /** ID of the event */
    public String id() {
        return id;
    }

    /** ID of the host affected by this event, i.e. instance ID */
    public String hostId() {
        return hostId;
    }

    /** Human-readable description of the event */
    public String description() {
        return description;
    }

    @Override
    public String toString() {
        return "event " + id + " affecting host " + hostId + ": '" + description + "'";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy