Package energy.trolie.client
Interface ETagStore
public interface ETagStore
Pluggable store for request ETag values.
As described in Conditional GET, the TROLIE specification relies heavily on use of Conditional GETs, using the standard ETag response header (see standards) to mark the version of data returned.
Implementations of this interface provide key-value storage for these
ETags as application state. By default, the TrolieClientBuilder
will
inject an in-memory implementation of this store. Users may wish to
override this interface however to use storage such as a database that better
maps to their own application architecture.
-
Method Summary
-
Method Details
-
getETag
Get the currently stored eTag for this particular path.- Parameters:
endpointPath
- The full path at which data is requested is effectively the key to look up the data.- Returns:
- raw string value if stored, null if non-existent.
-
putETag
Store a new value at this particular path.- Parameters:
endpointPath
- The full path at which data is requested is effectively the key to look up the data.eTag
- value of the eTag as returned in the response header from the TROLIE server.
-