Franz Wong created LANG-1611:
--------------------------------
Summary: Add an initializer which can compare and re-initialize
value
Key: LANG-1611
URL: https://issues.apache.org/jira/browse/LANG-1611
Project: Commons Lang
Issue Type: New Feature
Components: lang.concurrent.*
Reporter: Franz Wong
I would like to have a new class which is similar to {{AtomicSafeInitializer}}.
But we can compare and re-initialize the value.
The use case is to refresh access token (e.g. OAuth) when it expires. Multiple
threads tries to refresh the same token at the same time, but there should be
only one thread to do it, in addition, only the thread which passes the expired
token can trigger the initialization.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)