Code example for AtomicInteger

Methods: get, incrementAndGet

0
		} 
 
		@Override 
		public Socket send(String event, Object data, Reply.Fn reply) {
			doSend(event, data, true);
			replyHandler.set(id(), eventId.get(), reply);
			return this;
		} 
 
		protected void doSend(String type, Object data, boolean reply) {
			Map<String, Object> message = new LinkedHashMap<String, Object>();
 
			message.put("id", eventId.incrementAndGet());
			message.put("type", type);
			message.put("data", data);
			message.put("reply", reply);
 
			logger.info("Socket#{} is sending an event {}", id(), message);
			if (param("transport").startsWith("longpoll")) {
				cache.add(message);
			}