src/main/java/com/redislabs/quartz/RedisJobStore.java
/**
	 * Retrieves job from redis.
	 *
	 * @param jobKey the job key
	 * @param jedis thread-safe redis connection
	 * @return the job detail
	 * @throws JobPersistenceException
	 */
Retrieves job from redis.
@param jobKey the job key
@param jedis thread-safe redis connection
@return the job detail
@throws JobPersistenceException
Retrieves job from redis . @param jobKey the job key @param jedis thread - safe redis connection @return the job detail @throws JobPersistenceException
@SuppressWarnings("unchecked")
	private JobDetail retrieveJob(JobKey jobKey, Jedis jedis) throws JobPersistenceException, ClassNotFoundException {
		String jobHashkey = createJobHashKey(jobKey.getGroup(), jobKey.getName());
		String jobDataMapHashKey = createJobDataMapHashKey(jobKey.getGroup(), jobKey.getName());
      if (!jedis.exists(jobHashkey)) {
         log.warn("job: " + jobHashkey + " does not exist");
         return null;
      }
		Class<Job> jobClass = (Class<Job>) loadHelper.getClassLoader().loadClass(jedis.hget(jobHashkey, JOB_CLASS));
		JobBuilder jobBuilder = JobBuilder.newJob(jobClass)
									.withIdentity(jobKey)
									.withDescription(jedis.hget(jobHashkey, DESCRIPTION))
									.storeDurably(Boolean.getBoolean(jedis.hget(jobHashkey, IS_DURABLE)));
		Set<String> jobDataMapFields = jedis.hkeys(jobDataMapHashKey);
		if (!jobDataMapFields.isEmpty()) {
			for (String jobDataMapField : jobDataMapFields)
				jobBuilder.usingJobData(jobDataMapField, jedis.hget(jobDataMapHashKey, jobDataMapField));							
		}
		return jobBuilder.build();		
	}
@ SuppressWarnings ( "unchecked" ) private JobDetail retrieveJob ( JobKey jobKey , Jedis jedis ) throws JobPersistenceException , ClassNotFoundException { String jobHashkey = createJobHashKey ( jobKey . getGroup ( ) , jobKey . getName ( ) ) ; String jobDataMapHashKey = createJobDataMapHashKey ( jobKey . getGroup ( ) , jobKey . getName ( ) ) ; if ( ! jedis . exists ( jobHashkey ) ) { log . warn ( "job: " + jobHashkey + " does not exist" ) ; return null ; } Class < Job > jobClass = ( Class < Job > ) loadHelper . getClassLoader ( ) . loadClass ( jedis . hget ( jobHashkey , JOB_CLASS ) ) ; JobBuilder jobBuilder = JobBuilder . newJob ( jobClass ) . withIdentity ( jobKey ) . withDescription ( jedis . hget ( jobHashkey , DESCRIPTION ) ) . storeDurably ( Boolean . getBoolean ( jedis . hget ( jobHashkey , IS_DURABLE ) ) ) ; Set < String > jobDataMapFields = jedis . hkeys ( jobDataMapHashKey ) ; if ( ! jobDataMapFields . isEmpty ( ) ) { for ( String jobDataMapField : jobDataMapFields ) jobBuilder . usingJobData ( jobDataMapField , jedis . hget ( jobDataMapHashKey , jobDataMapField ) ) ; } return jobBuilder . build ( ) ; }
Retrieves job from redis.
Retrieves job from redis .