當前位置: 首頁>>代碼示例>>Java>>正文


Java TimerSchedule類代碼示例

本文整理匯總了Java中org.xdi.service.timer.schedule.TimerSchedule的典型用法代碼示例。如果您正苦於以下問題:Java TimerSchedule類的具體用法?Java TimerSchedule怎麽用?Java TimerSchedule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TimerSchedule類屬於org.xdi.service.timer.schedule包,在下文中一共展示了TimerSchedule類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
      log.info("Initializing Cache Refresh Timer");
      this.isActive = new AtomicBoolean(false);

// Clean up previous Inum cache
CacheRefreshConfiguration cacheRefreshConfiguration = configurationFactory.getCacheRefreshConfiguration();
if (cacheRefreshConfiguration != null) {
	String snapshotFolder = cacheRefreshConfiguration.getSnapshotFolder();
	if (StringHelper.isNotEmpty(snapshotFolder)) {
		String inumCachePath = getInumCachePath(cacheRefreshConfiguration);
		objectSerializationService.cleanup(inumCachePath);
	}
}

// Schedule to start cache refresh every 1 minute
final int delay = 1 * 60;
final int interval = DEFAULT_INTERVAL;

timerEvent.fire(new TimerEvent(new TimerSchedule(delay, DEFAULT_INTERVAL), new CacheRefreshEvent(),
		Scheduled.Literal.INSTANCE));

      this.lastFinishedTime = System.currentTimeMillis();
  }
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:24,代碼來源:CacheRefreshTimer.java

示例2: schedule

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void schedule(@Observes TimerEvent timerEvent) {
	checkInitialized();
	
	JobDataMap dataMap = new JobDataMap();
	dataMap.put(TimerJob.KEY_TIMER_EVENT, timerEvent);

	String uuid = UUID.randomUUID().toString();

	JobDetail timerJob = JobBuilder.newJob(TimerJob.class)
			.withIdentity(TimerJob.class.getSimpleName() + "_" + uuid, TimerJob.TIMER_JOB_GROUP)
			.usingJobData(dataMap).build();

	TimerSchedule timerSchedule = timerEvent.getSchedule();
	Date triggerStartTime = new Date(System.currentTimeMillis() + timerSchedule.getDelay() * 1000L);
	Trigger timerTrigger = TriggerBuilder.newTrigger().withIdentity(uuid, TimerJob.TIMER_JOB_GROUP)
			.startAt(triggerStartTime)
			.withSchedule(SimpleScheduleBuilder.repeatSecondlyForever(timerSchedule.getInterval())).build();

	try {
		scheduler.scheduleJob(timerJob, timerTrigger);
	} catch (SchedulerException ex) {
		throw new IllegalStateException("Failed to schedule Timer Event", ex);
	}
}
 
開發者ID:GluuFederation,項目名稱:oxCore,代碼行數:25,代碼來源:QuartzSchedulerManager.java

示例3: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
      log.info("Initializing Ldap Status Timer");
      this.isActive = new AtomicBoolean(false);

timerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new LdapStatusEvent(),
		Scheduled.Literal.INSTANCE));
  }
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:8,代碼來源:LdapStatusTimer.java

示例4: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
	log.debug("Initializing Configuration Timer");

	final int delay = 30;
	final int interval = DEFAULT_INTERVAL;

	timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new ConfigurationEvent(),
			Scheduled.Literal.INSTANCE));
}
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:10,代碼來源:ConfigurationFactory.java

示例5: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
      log.info("Initializing Daily Status Cheker Timer");
      this.isActive = new AtomicBoolean(false);

final int delay = 1 * 60;
final int interval = DEFAULT_INTERVAL;

timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new StatusCheckerDailyEvent(),
		Scheduled.Literal.INSTANCE));
  }
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:11,代碼來源:StatusCheckerDaily.java

示例6: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
	log.debug("Initializing Metadata Validation Timer");

	final int delay = 30;
	final int interval = DEFAULT_INTERVAL;

	timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new MetadataValidationEvent(),
			Scheduled.Literal.INSTANCE));
}
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:10,代碼來源:MetadataValidationTimer.java

示例7: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
	log.debug("Initializing EntityId Monitoring Timer");
	this.isActive = new AtomicBoolean(false);

	final int delay = 30;
	final int interval = DEFAULT_INTERVAL;

	timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new EntityIdMonitoringEvent(),
			Scheduled.Literal.INSTANCE));
}
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:11,代碼來源:EntityIDMonitoringService.java

示例8: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
	log.debug("Initializing SVN Sync Timer");

	if (!appConfiguration.isPersistSVN()) {
		return;
	}

	final int delay = 30;
	final int interval = DEFAULT_INTERVAL;

	timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new SvnSyncEvent(),
			Scheduled.Literal.INSTANCE));
}
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:14,代碼來源:SvnSyncTimer.java

示例9: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
      log.info("Initializing Daily Status Cheker Timer");
      this.isActive = new AtomicBoolean(false);

final int delay = 1 * 60;
final int interval = DEFAULT_INTERVAL;

timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new StatusCheckerTimerEvent(),
		Scheduled.Literal.INSTANCE));
  }
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:11,代碼來源:StatusCheckerTimer.java

示例10: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
      log.info("Initializing Log File Size Checker Timer");
      this.isActive = new AtomicBoolean(false);

final int delay = 2 * 60;
final int interval = DEFAULT_INTERVAL;

timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new LogFileSizeChekerEvent(),
		Scheduled.Literal.INSTANCE));
  }
 
開發者ID:GluuFederation,項目名稱:oxTrust,代碼行數:11,代碼來源:LogFileSizeChecker.java

示例11: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
@Asynchronous
  public void initTimer(List<CustomScriptType> supportedCustomScriptTypes) {
this.supportedCustomScriptTypes = supportedCustomScriptTypes;

this.isActive = new AtomicBoolean(false);
this.lastFinishedTime = System.currentTimeMillis();

final int delay = 30;
final int interval = DEFAULT_INTERVAL;

reload();

timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new UpdateScriptEvent(), Scheduled.Literal.INSTANCE));
  }
 
開發者ID:GluuFederation,項目名稱:oxCore,代碼行數:15,代碼來源:CustomScriptManager.java

示例12: TimerEvent

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public TimerEvent(TimerSchedule schedule, Object targetEvent, Annotation... qualifiers) {
	if (schedule == null) {
		throw new IllegalArgumentException("Schedule must not be null");
	}

	if (targetEvent == null) {
		throw new IllegalArgumentException("Target event must not be null");
	}

	this.schedule = schedule;
	this.targetEvent = targetEvent;
	this.qualifiers = qualifiers;
}
 
開發者ID:GluuFederation,項目名稱:oxCore,代碼行數:14,代碼來源:TimerEvent.java

示例13: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
	log.debug("Initializing Key Generator Timer");

	this.isActive = new AtomicBoolean(false);

	int interval = appConfiguration.getKeyRegenerationInterval();
	if (interval <= 0) {
		interval = DEFAULT_INTERVAL;
	}

	interval = interval * 3600;
	timerEvent.fire(new TimerEvent(new TimerSchedule(interval, interval), new KeyGenerationEvent(),
			Scheduled.Literal.INSTANCE));
}
 
開發者ID:GluuFederation,項目名稱:oxAuth,代碼行數:15,代碼來源:KeyGeneratorTimer.java

示例14: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
this.isActive = new AtomicBoolean(false);
this.lastFinishedTime = System.currentTimeMillis();

timerEvent.fire(new TimerEvent(new TimerSchedule(60, DEFAULT_INTERVAL), new AuthConfigurationEvent(),
		Scheduled.Literal.INSTANCE));
  }
 
開發者ID:GluuFederation,項目名稱:oxAuth,代碼行數:8,代碼來源:AppInitializer.java

示例15: initTimer

import org.xdi.service.timer.schedule.TimerSchedule; //導入依賴的package包/類
public void initTimer() {
    log.debug("Initializing Cleaner Timer");
    this.isActive = new AtomicBoolean(false);

    int interval = appConfiguration.getCleanServiceInterval();
    if (interval <= 0) {
        interval = DEFAULT_INTERVAL;
    }

    cleanerEvent.fire(new TimerEvent(new TimerSchedule(interval, interval), new CleanerEvent(), Scheduled.Literal.INSTANCE));
}
 
開發者ID:GluuFederation,項目名稱:oxAuth,代碼行數:12,代碼來源:CleanerTimer.java


注:本文中的org.xdi.service.timer.schedule.TimerSchedule類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。