SHARE
TWEET

Untitled

a guest Jun 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public final class DataStructure {
  2.  
  3.      private final Map<String> _data = ConcurrentHashMap.newKeySet();
  4.  
  5.      public void add(final String s) {
  6.           _data.add(s);
  7.      }
  8.  
  9.      synchronized public void writeToDisk() {
  10.           // code to write _data to disc
  11.           _data.clear();
  12.      }
  13. }
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