public JobDetail retrieveJob ( JobKey jobKey , T jedis ) throws JobPersistenceException , ClassNotFoundException { final String jobHashKey = redisSchema . jobHashKey ( jobKey ) ; final String jobDataMapHashKey = redisSchema . jobDataMapHashKey ( jobKey ) ; final Map < String , String > jobDetailMap = jedis . hgetAll ( jobHashKey ) ; if ( jobDetailMap == null || jobDetailMap . size ( ) == 0 ) { // desired job does not exist return null ; } JobDetailImpl jobDetail = mapper . convertValue ( jobDetailMap , JobDetailImpl . class ) ; jobDetail . setKey ( jobKey ) ; final Map < String , String > jobData = jedis . hgetAll ( jobDataMapHashKey ) ; if ( jobData != null && ! jobData . isEmpty ( ) ) { JobDataMap jobDataMap = new JobDataMap ( ) ; jobDataMap . putAll ( jobData ) ; jobDetail . setJobDataMap ( jobDataMap ) ; } return jobDetail ; }
Retrieve a job from redis