blob: dbdf19249a0fe5a92282b5f09d1bc17dca43987d (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core;
import com.yahoo.vdslib.state.ClusterState;
/**
* Tuple representing a mapping from a named bucket space to the derived ClusterState
* for that space.
*/
public class StateMapping {
final String bucketSpace;
final ClusterState state;
private StateMapping(String bucketSpace, ClusterState state) {
this.bucketSpace = bucketSpace;
this.state = state;
}
public static StateMapping of(String bucketSpace, String state) {
return new StateMapping(bucketSpace, ClusterState.stateFromString(state));
}
}
|