Package io.jenkins.plugins.kubevirt
Class PortForwardCleanupPeriodicWork
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
hudson.model.AsyncPeriodicWork
io.jenkins.plugins.kubevirt.PortForwardCleanupPeriodicWork
- All Implemented Interfaces:
ExtensionPoint,Runnable
Periodic background task that checks for and cleans up orphaned port-forward resources.
This provides an additional safety net for detecting port-forward resources whose launcher was garbage collected without proper cleanup (e.g., due to serialization during Jenkins restart, or abnormal connection termination).
The task runs periodically (default: every 15 minutes) and checks if any tracked port-forward resources have become orphaned (their launcher WeakReference has been cleared by the garbage collector).
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnableNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.AsyncPeriodicWork
nameFields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hudson.model.AsyncPeriodicWork
createListener, doRun, getErrorLoggingLevel, getLogFile, getNormalLoggingLevel, getSlowLoggingLevel, queueIfAlreadyRunningMethods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, initMethods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, runMethods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
PortForwardCleanupPeriodicWork
public PortForwardCleanupPeriodicWork()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()- Specified by:
getRecurrencePeriodin classPeriodicWork
-
execute
- Specified by:
executein classAsyncPeriodicWork
-