public interface JsonInputSource
Provide data as a stream of JSON data
Shesmu will automatically use the standard streaming JSON unmarshalling protocol to simplify data extraction
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonInputSource
An input source that contains no values (while being valid JSON) -
Method Summary
-
Field Details
-
EMPTY
An input source that contains no values (while being valid JSON)
-
-
Method Details
-
fetch
Get the stream.Shesmu will manage caching the output, so this method will only be called when the cache needs to be refreshed.
- Returns:
- a stream of JSON data in the expected input format
- Throws:
Exception
- if an error accessing the data occurred the cache will serve stale data if an exception is thrown
-
ttl
Allow dynamically changing the TTL for this cache.This is only read when the cache has already expired and will be in effect until it expires.
- Returns:
- the new TTL, in minutes, or an empty optional to keep using the existing time
-