Code example for AtomicReference

Methods: compareAndSet, get

0
		 * @see net.sf.hajdbc.util.concurrent.RegistryStore#setIfAbsent(java.lang.Object, java.lang.Object) 
		 */ 
		@Override 
		public V setIfAbsent(Void key, V value)
		{ 
			return this.reference.compareAndSet(null, value) ? null : this.reference.get();
		} 
 
		/** 
		 * {@inheritDoc} 
		 * @see net.sf.hajdbc.util.concurrent.RegistryStore#get(java.lang.Object) 
		 */ 
		@Override 
		public V get(Void key)
		{ 
			return this.reference.get();
		} 
 
		/** 
		 * {@inheritDoc} 
		 * @see net.sf.hajdbc.util.concurrent.RegistryStore#clear(java.lang.Object)