Code example for Cache

Methods: getIfPresent

0
            job.errorTask(task, errorCode);
        } 
    } 
 
    public boolean haveRecentlyFixedTask(JobKey jobKey) {
        return recentlyFixedTaskCache.getIfPresent(jobKey) != null;
    } 
 
    public void markTaskRecentlyFixed(JobKey jobKey) {
        if (jobKey != null) {
            recentlyFixedTaskCache.put(jobKey, true);
        } 
    } 
 
} 
Experience pair programming with AI  Get Codota for Java