protected Record getOrNullIfExpired ( Record record , long now , boolean backup ) { if ( ! isRecordStoreExpirable ( ) ) { return record ; } if ( record == null ) { return null ; } Data key = record . getKey ( ) ; if ( isLocked ( key ) ) { return record ; } if ( ! isExpired ( record , now , backup ) ) { return record ; } evict ( key , backup ) ; if ( ! backup ) { doPostEvictionOperations ( record ) ; } return null ; }
Check if record is reachable according to TTL or idle times . If not reachable return null .