blob: 644130628606a9af484daa71f5b85bb26b822948 (
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
36
37
38
39
40
41
42
43
44
45
|
// 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.core;
public class ClusterEvent implements Event{
enum Type {
SYSTEMSTATE,
MASTER_ELECTION
}
private String description;
private long timeMs = 0;
private Type type;
public ClusterEvent(Type type, String description, long timeMs) {
this.type = type;
this.description = description;
this.timeMs = timeMs;
}
@Override
public long getTimeMs() {
return timeMs;
}
@Override
public String getDescription() {
return description;
}
public Type getType() {
return type;
}
@Override
public String toString() {
return "Cluster event type " + type + " @" + timeMs + ": " + description;
}
@Override
public String getCategory() {
return type.toString();
}
}
|