public SourcedValue getSourced ( ) { boolean fromCache = true ; int cacheVersion = stampedValue . getStamp ( ) ; int latestVersion = parentContainer . getMasterVersion ( ) ; String key = parentContainer . getKey ( ) ; SourcedValue sourcedValue = null ; if ( cacheVersion != latestVersion ) { SourcedValue currentValue = stampedValue . getReference ( ) ; SourcedValue newValue = config . getSourcedValue ( type , key ) ; if ( stampedValue . compareAndSet ( currentValue , newValue , cacheVersion , latestVersion ) ) { sourcedValue = newValue ; fromCache = false ; } } if ( fromCache ) { sourcedValue = stampedValue . getReference ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { if ( sourcedValue != null ) { Tr . debug ( tc , "get: Key={0}, Value={1}" , key , sourcedValue ) ; } else { Tr . debug ( tc , "get: Key={0} not found" , key ) ; } } return sourcedValue ; }
Fetch the latest version of the property . If not up to date then resolve to the latest value inline .