blob: c00c5b6b6e3bcb6d212edd2203553749e62ed673 (
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
|
package com.yahoo.config.provision;
import java.time.Instant;
import java.util.Optional;
/**
* Instances of this are used to keep track of (notify and query)
* which hosts are currently connected to the config system.
*
* @author bratseth
*/
public interface HostLivenessTracker {
/** Called each time a config request is received from a client */
void receivedRequestFrom(String hostname);
/**
* Returns the epoch timestamp of the last request received from the given hostname,
* or empty if there is no memory of this host making a request
*/
Optional<Instant> lastRequestFrom(String hostname);
}
|