SHARE
TWEET

Untitled

a guest Jun 27th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private volatile Map<...> db = new HashMap<>();
  2. ...
  3. void synchronized update() {
  4.     var tmpDb = new HashMap<>();
  5.     // populate tmpDb then swap
  6.     db = tmpDb;
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top