reta commented on code in PR #3622:
URL: https://github.com/apache/cxf/pull/3622#discussion_r4358554777
##########
rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/jcache/JCacheReplayCache.java:
##########
@@ -103,6 +103,24 @@ public void add(String identifier, Instant expiry) {
cache.put(identifier, new EHCacheValue(identifier, expiry));
}
+ /**
+ * Add the given identifier to the cache if, and only if, it is not
already contained in it, as a
+ * single atomic operation. This overrides ReplayCache.addIfAbsent, whose
default implementation is
+ * only atomic within a single JVM, whereas a JCache provider may be
distributed.
+ * @param identifier The identifier to be added
+ * @param expiry A custom expiry time for the identifier. Can be null in
which case, the default
+ * expiry is used.
+ * @return true if the identifier was added, false if it was already
contained in the cache or is
+ * null or empty
+ */
+ public boolean addIfAbsent(String identifier, Instant expiry) {
Review Comment:
This method is not used anywhere internally, what is the case for it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]