@Override
    @FFDCIgnore(Exception.class) //manually logged
    @Trivial // return value contains customer data
    protected Object loadOneValue(String attrName, BackedSession sess) {
        @SuppressWarnings("static-access")
        final boolean hideValues = _smc.isHideSessionValues();
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "loadOneValue", attrName, sess);

        Object value = null;
        try {
            if (!((CacheSession) sess).getPopulatedAppData()) {
                String id = sess.getId();

                String key = createSessionAttributeKey(id, attrName);

                if (trace && tc.isDebugEnabled())
                    tcInvoke(tcSessionAttrCache, "get", key);

                byte[] bytes = sessionAttributeCache.get(key);

                if (bytes == null || bytes.length == 0) {
                    if (trace && tc.isDebugEnabled())
                        tcReturn(tcSessionAttrCache, "get", bytes);
                } else {
                    long startTime = System.nanoTime();
                    try {
                        value = deserialize(bytes);
                        if (trace && tc.isDebugEnabled())
                            if (hideValues)
                                tcReturn(tcSessionAttrCache, "get", "byte[" + bytes.length + "]");
                            else
                                tcReturn(tcSessionAttrCache, "get", bytes, value);
                    } catch (Exception x) {
                        if (trace && tc.isDebugEnabled())
                            tcReturn(tcSessionAttrCache, "get", hideValues ? "byte[" + bytes.length + "]" : bytes);
                        FFDCFilter.processException(x, getClass().getName(), "197", sess, new Object[] { hideValues ? bytes.length : TypeConversion.limitedBytesToString(bytes) });
                        throw x;
                    }

                    SessionStatistics pmiStats = getIStore().getSessionStatistics();
                    if (pmiStats != null) {
                        pmiStats.readTimes(bytes == null ? 0 : bytes.length, TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime));
                    }
                }

                // Before returning the value, confirm that the session hasn't expired
                if (trace && tc.isDebugEnabled())
                    tcInvoke(tcSessionMetaCache, "containsKey", id);

                boolean contains = sessionMetaCache.containsKey(id);

                if (trace && tc.isDebugEnabled())
                    tcReturn(tcSessionMetaCache, "containsKey", contains);

                if (!contains) {
                    value = null;
                }
            }
        } catch(Exception ex) {
            FFDCFilter.processException(ex, "com.ibm.ws.session.store.cache.CacheHashMap.loadOneValue", "778", this, new Object[] { sess });
            Tr.error(tc, "LOAD_VALUE_ERROR", ex);
            throw new RuntimeException(Tr.formatMessage(tc, "INTERNAL_SERVER_ERROR"));
        }

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "loadOneValue", hideValues ? (value == null ? null : "not null") : value);
        return value;
    }
@ Override @ FFDCIgnore ( Exception . class ) @ Trivial protected Object loadOneValue ( String attrName , BackedSession sess ) { @ SuppressWarnings ( "static-access" ) final boolean hideValues = _smc . isHideSessionValues ( ) ; final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "loadOneValue" , attrName , sess ) ; Object value = null ; try { if ( ! ( ( CacheSession ) sess ) . getPopulatedAppData ( ) ) { String id = sess . getId ( ) ; String key = createSessionAttributeKey ( id , attrName ) ; if ( trace && tc . isDebugEnabled ( ) ) tcInvoke ( tcSessionAttrCache , "get" , key ) ; byte [ ] bytes = sessionAttributeCache . get ( key ) ; if ( bytes == null || bytes . length == 0 ) { if ( trace && tc . isDebugEnabled ( ) ) tcReturn ( tcSessionAttrCache , "get" , bytes ) ; } else { long startTime = System . nanoTime ( ) ; try { value = deserialize ( bytes ) ; if ( trace && tc . isDebugEnabled ( ) ) if ( hideValues ) tcReturn ( tcSessionAttrCache , "get" , "byte[" + bytes . length + "]" ) ; else tcReturn ( tcSessionAttrCache , "get" , bytes , value ) ; } catch ( Exception x ) { if ( trace && tc . isDebugEnabled ( ) ) tcReturn ( tcSessionAttrCache , "get" , hideValues ? "byte[" + bytes . length + "]" : bytes ) ; FFDCFilter . processException ( x , getClass ( ) . getName ( ) , "197" , sess , new Object [ ] { hideValues ? bytes . length : TypeConversion . limitedBytesToString ( bytes ) } ) ; throw x ; } SessionStatistics pmiStats = getIStore ( ) . getSessionStatistics ( ) ; if ( pmiStats != null ) { pmiStats . readTimes ( bytes == null ? 0 : bytes . length , TimeUnit . NANOSECONDS . toMillis ( System . nanoTime ( ) - startTime ) ) ; } } if ( trace && tc . isDebugEnabled ( ) ) tcInvoke ( tcSessionMetaCache , "containsKey" , id ) ; boolean contains = sessionMetaCache . containsKey ( id ) ; if ( trace && tc . isDebugEnabled ( ) ) tcReturn ( tcSessionMetaCache , "containsKey" , contains ) ; if ( ! contains ) { value = null ; } } } catch ( Exception ex ) { FFDCFilter . processException ( ex , "com.ibm.ws.session.store.cache.CacheHashMap.loadOneValue" , "778" , this , new Object [ ] { sess } ) ; Tr . error ( tc , "LOAD_VALUE_ERROR" , ex ) ; throw new RuntimeException ( Tr . formatMessage ( tc , "INTERNAL_SERVER_ERROR" ) ) ; } if ( trace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "loadOneValue" , hideValues ? ( value == null ? null : "not null" ) : value ) ; return value ; }
Copied from DatabaseHashMap.
Attempts to get the requested attr from the cache
Returns null if attr doesn't exist
We consider populatedAppData as well
populatedAppData is true when session is new or when the entire session is read into memory
in those cases, we don't want to go to the backend to retrieve the attribute

@see com.ibm.ws.session.store.common.BackedHashMap#loadOneValue(java.lang.String, com.ibm.ws.session.store.common.BackedSession)