Code example for AtomicReference

Methods: compareAndSet, get

0
        } 
        return getTransformMap(); 
    } 
 
    protected ComponentUpdater<TMapComponent> getComponentUpdater() { 
        SyncUpdateVisitor updater = myUpdateVisitor.get();
        if (updater == null) {
            myUpdateVisitor.compareAndSet(null, new SyncUpdateVisitor());
            updater = myUpdateVisitor.get();
        } 
        return updater;
    } 
 
    public TransformMap getTransformMap() { 
        return (TransformMap)getRootComponent(); 
    } 
     
    public TMapComponent getRootComponent() { 
        return myRoot;
    }