Code example for AtomicReference

Methods: getAndSet

0
	/** 
	 * @return 
	 * @see org.jboss.netty.channel.Channel#close() 
	 */ 
	public ChannelFuture close() { 
		Timeout t = timerTimeout.getAndSet(null);
		if(t!=null) t.cancel();
		return channel.close();
	} 
	 
	 
 
	/** 
	 * @param o 
	 * @return 
	 * @see java.lang.Comparable#compareTo(java.lang.Object) 
	 */ 
	public int compareTo(Channel o) {
		return channel.compareTo(o);
	}