blob: d94124709f751807c5c5198736c350ef6a300a8d (
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
31
32
33
34
35
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.routing.rotation;
import com.yahoo.text.Text;
import java.util.Objects;
/**
* Represents a global routing rotation.
*
* @author mpolden
*/
public record Rotation(RotationId id, String name) {
public Rotation {
Objects.requireNonNull(id);
Objects.requireNonNull(name);
}
/** The ID of the allocated rotation. This value is generated by global routing system */
public RotationId id() {
return id;
}
/** The global rotation FQDN */
public String name() {
return name;
}
@Override
public String toString() {
return Text.format("rotation %s -> %s", id().asString(), name());
}
}
|