Code example for CopyOnWriteArraySet

0
		private AtomicBoolean opened = new AtomicBoolean(false);
		protected boolean isAndroid;
		protected Map<String, String> params;
		protected ObjectMapper mapper = new ObjectMapper();
		protected AtomicInteger eventId = new AtomicInteger();
		protected Set<Map<String, Object>> cache = new CopyOnWriteArraySet<Map<String, Object>>();
 
		@Override 
		public String id() {
			return params.get("id");
		} 
 
		@Override 
		public String param(String key) {
			return params.get(key);
		} 
		 
		@Override 
		public boolean opened() { 
			return opened.get();
		}