blob: ae4f1e9e99ec4c17fb54d0398adfb458ded99b78 (
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
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude;
/**
* A ping, typically to ask whether backend is alive.
*
* @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
*/
public class Ping {
/** How long to wait for a pong */
private long timeout;
public Ping() {
this(500);
}
public Ping(long timeout) {
this.timeout = timeout;
}
public long getTimeout() {
return timeout;
}
@Override
public String toString() {
return "Ping(timeout = " + timeout + ")";
}
}
|