/** * Determines, if the node is available. If it's not cached, it's loaded * from the cache loader. * * @param key * the key to check * @return <code>true</code> if the node is marked as available. */ public boolean isNodeAvailable( @Nonnull final K key ) { final ManagedItem<Boolean> item = _map.get( key ); if ( item == null ) { return updateIsNodeAvailable( key ); } else if ( isExpired( item ) ) { _map.remove( key ); return updateIsNodeAvailable( key ); } else { return item._value; } }
/** * Determines, if the node is available. If it's not cached, it's loaded * from the cache loader. * * @param key * the key to check * @return <code>true</code> if the node is marked as available. */ public boolean isNodeAvailable( @Nonnull final K key ) { final ManagedItem<Boolean> item = _map.get( key ); if ( item == null ) { return updateIsNodeAvailable( key ); } else if ( isExpired( item ) ) { _map.remove( key ); return updateIsNodeAvailable( key ); } else { return item._value; } }