当前位置: 首页>>代码示例>>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;未经允许,请勿转载。