Code example for AtomicReference

Methods: getAndSet

0
			else { 
				windowSize = Math.min(windowSize * WINDOW_SIZE_MULTIPLIER, response instanceof IEHTMLFileCometServletResponse ? IE_MAX_WINDOW_SIZE : MAX_WINDOW_SIZE);
			} 
		} 
		 
		return this.response.getAndSet(response);
	} 
	 
	boolean clearResponse(CometServletResponseImpl response) {
		return this.response.compareAndSet(response, null);
	} 
	 
	CometServletResponseImpl getResponse() { 
		return response.get();
	} 
	 
	boolean setRefresh() { 
		boolean result = refreshing.compareAndSet(false, true);
		if (result) {
			refreshSentTime = System.currentTimeMillis();