Пример #1
0
        /// <summary>
        /// Creates a persistent job store using the specified DAO.
        /// </summary>
        /// <param name="jobStoreDao">The job store DAO to use for persistence</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="jobStoreDao"/> is null</exception>
        public PersistentJobStore(IJobStoreDao jobStoreDao)
        {
            if (jobStoreDao == null)
                throw new ArgumentNullException("jobStoreDao");
            this.jobStoreDao = jobStoreDao;

            clusterName = "Default";
            schedulerExpirationTimeInSeconds = 120;
            pollIntervalInSeconds = 15;

            registeredSchedulers = new Dictionary<Guid, string>();

            StartRegistrationTimer();
        }
        /// <summary>
        /// Creates a persistent job store using the specified DAO.
        /// </summary>
        /// <param name="jobStoreDao">The job store DAO to use for persistence</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="jobStoreDao"/> is null</exception>
        public PersistentJobStore(IJobStoreDao jobStoreDao)
        {
            if (jobStoreDao == null)
            {
                throw new ArgumentNullException("jobStoreDao");
            }
            this.jobStoreDao = jobStoreDao;

            clusterName = "Default";
            schedulerExpirationTimeInSeconds = 120;
            pollIntervalInSeconds            = 15;

            registeredSchedulers = new Dictionary <Guid, string>();

            StartRegistrationTimer();
        }