-
Notifications
You must be signed in to change notification settings - Fork 0
1.1.1 ETagable
Anders Mikkelsen edited this page Dec 15, 2017
·
3 revisions
This interface asks for a setter and getter for etags, and is not directly concerned with how you store and/or generate it.
String getEtag();
ETagable setEtag(String etag);
It also has a default implementation to construct the etag of the object, which ends up in a map which also includes and subobjects that are also ETagable. This can be overriden if you want a hardcoded version of this.
default Map<String, String> generateAndSetEtag(Map<String, String> map) { ... }
The last method to override is for generating the unique etag identifier for a particular object:
String generateEtagKeyIdentifier();