CachedWaterQualityClient

marola.water.CachedWaterQualityClient
See theCachedWaterQualityClient companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def decode(json: JsonValue): List[SamplingPoint]

A malformed or partial cache yields the points it can read, never an exception: a broken cache must degrade to "no data", exactly as a failed fetch does.

A malformed or partial cache yields the points it can read, never an exception: a broken cache must degrade to "no data", exactly as a failed fetch does.

Attributes

def encode(points: List[SamplingPoint]): JsonValue
def fileFor(dir: Path, providerName: String): Path

One file per provider, named for it, so two providers never overwrite each other.

One file per provider, named for it, so two providers never overwrite each other.

Attributes

def read(file: Path): List[SamplingPoint]
def write(file: Path, points: List[SamplingPoint]): Unit