src/main/java/com/redislabs/quartz/RedisJobStore.java
/**
	 * Retrieve calendar.
	 *
	 * @param calname the calendar name
	 * @param jedis thread-safe redis connection
	 * @return the calendar
	 * @throws JobPersistenceException 
	 */
Retrieve calendar.
@param calname the calendar name
@param jedis thread-safe redis connection
@return the calendar
@throws JobPersistenceException
Retrieve calendar . @param calname the calendar name @param jedis thread - safe redis connection @return the calendar @throws JobPersistenceException
@SuppressWarnings({ "rawtypes", "unchecked" })
	private Calendar retrieveCalendar(String calName, Jedis jedis)
			throws JobPersistenceException {
		Calendar calendar = null; 
		try {			
			String calendarHashKey = createCalendarHashKey(calName);
			if (!jedis.exists(calendarHashKey))
				throw new JobPersistenceException(calendarHashKey + " does not exist");
			Gson gson = new Gson();
			Class calClass = Class.forName(jedis.hget(calendarHashKey, CALENDAR_CLASS));
         calendar = (Calendar) gson.fromJson(jedis.hget(calendarHashKey, CALENDAR_SERIALIZED), calClass);
		} catch (ClassNotFoundException ex) {
			log.warn("class not found for calendar: " + calName, ex);
		}
		return calendar;
	}
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private Calendar retrieveCalendar ( String calName , Jedis jedis ) throws JobPersistenceException { Calendar calendar = null ; try { String calendarHashKey = createCalendarHashKey ( calName ) ; if ( ! jedis . exists ( calendarHashKey ) ) throw new JobPersistenceException ( calendarHashKey + " does not exist" ) ; Gson gson = new Gson ( ) ; Class calClass = Class . forName ( jedis . hget ( calendarHashKey , CALENDAR_CLASS ) ) ; calendar = ( Calendar ) gson . fromJson ( jedis . hget ( calendarHashKey , CALENDAR_SERIALIZED ) , calClass ) ; } catch ( ClassNotFoundException ex ) { log . warn ( "class not found for calendar: " + calName , ex ) ; } return calendar ; }
Retrieve calendar.
Retrieve calendar .