FileServerListProvider

Server provider that stores servers in a file using protobuf.

Parameters

file

the filename that will store the servers

Constructors

Link copied to clipboard
constructor(file: File)

Instantiates a FileServerListProvider object.

constructor(filename: String)

Instantiates a FileServerListProvider object.

constructor(file: Path)

Initialize a new instance of FileStorageServerListProvider

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val file: Path
Link copied to clipboard
open override val lastServerListRefresh: Instant

Returns the last time the file was written on disk

Functions

Link copied to clipboard
open override fun fetchServerList(): List<ServerRecord>

Read the stored list of servers from the file

Link copied to clipboard
open override fun updateServerList(endpoints: List<ServerRecord>)

Writes the supplied list of servers to persistent storage