org.jenkinsci.plugins.gravatar.cache
Class PeriodicGravatarImageResolutionCacheFillingWorker

java.lang.Object
  extended by java.util.TimerTask
      extended by hudson.triggers.SafeTimerTask
          extended by hudson.model.PeriodicWork
              extended by hudson.model.AsyncPeriodicWork
                  extended by org.jenkinsci.plugins.gravatar.cache.PeriodicGravatarImageResolutionCacheFillingWorker
All Implemented Interfaces:
hudson.ExtensionPoint, Runnable

@Extension
public class PeriodicGravatarImageResolutionCacheFillingWorker
extends hudson.model.AsyncPeriodicWork

Async periodic worker that updates the cached map in UserGravatarResolver It will run at startup and every 30 minutes to check if any user has set a gravatar since last run. The UserGravatarResolver will cache the check for gravatars so the time required when showing the People pages will be as short as possible. This worker task makes sure that the cache is updated every 30 minutes.

Author:
Erik Ramfelt

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.AsyncPeriodicWork
name
 
Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN
 
Constructor Summary
PeriodicGravatarImageResolutionCacheFillingWorker()
           
 
Method Summary
protected  void execute(hudson.model.TaskListener listener)
           
 long getInitialDelay()
           
 long getRecurrencePeriod()
           
 
Methods inherited from class hudson.model.AsyncPeriodicWork
createListener, doRun, getLogFile
 
Methods inherited from class hudson.model.PeriodicWork
all
 
Methods inherited from class hudson.triggers.SafeTimerTask
run
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeriodicGravatarImageResolutionCacheFillingWorker

public PeriodicGravatarImageResolutionCacheFillingWorker()
Method Detail

execute

protected void execute(hudson.model.TaskListener listener)
                throws IOException,
                       InterruptedException
Specified by:
execute in class hudson.model.AsyncPeriodicWork
Throws:
IOException
InterruptedException

getRecurrencePeriod

public long getRecurrencePeriod()
Specified by:
getRecurrencePeriod in class hudson.model.PeriodicWork

getInitialDelay

public long getInitialDelay()
Overrides:
getInitialDelay in class hudson.model.PeriodicWork


Copyright © 2004-2014. All Rights Reserved.