Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.WithFixedDelay
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.WithFixedDelay
-
- All Implemented Interfaces:
AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
- Enclosing interface:
- AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
@Enhance public static class AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.WithFixedDelay extends java.lang.Object implements AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
A resubmission scheduler that schedules jobs with a fixed delay.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.AtFixedRate, AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.Cancelable, AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.NoOp, AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.WithFixedDelay
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ScheduledExecutorService
scheduledExecutorService
The executor service to schedule to.private long
time
The time interval to pause between completed jobs.private java.util.concurrent.TimeUnit
timeUnit
The time's time unit.
-
Constructor Summary
Constructors Constructor Description WithFixedDelay(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long time, java.util.concurrent.TimeUnit timeUnit)
Creates a new resubmission scheduler with a fixed delay between job executions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAlive()
Checks if this scheduler is currently available.AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.Cancelable
schedule(java.lang.Runnable job)
Schedules a resubmission job for regular application.
-
-
-
Field Detail
-
scheduledExecutorService
private final java.util.concurrent.ScheduledExecutorService scheduledExecutorService
The executor service to schedule to.
-
time
private final long time
The time interval to pause between completed jobs.
-
timeUnit
private final java.util.concurrent.TimeUnit timeUnit
The time's time unit.
-
-
Constructor Detail
-
WithFixedDelay
public WithFixedDelay(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long time, java.util.concurrent.TimeUnit timeUnit)
Creates a new resubmission scheduler with a fixed delay between job executions.- Parameters:
scheduledExecutorService
- The executor service to schedule to.time
- The time interval to pause between completed jobs.timeUnit
- The time's time unit.
-
-
Method Detail
-
isAlive
public boolean isAlive()
Checks if this scheduler is currently available.- Specified by:
isAlive
in interfaceAgentBuilder.RedefinitionStrategy.ResubmissionScheduler
- Returns:
true
if this scheduler is alive.
-
schedule
public AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.Cancelable schedule(java.lang.Runnable job)
Schedules a resubmission job for regular application.- Specified by:
schedule
in interfaceAgentBuilder.RedefinitionStrategy.ResubmissionScheduler
- Parameters:
job
- The job to schedule.- Returns:
- A cancelable that is canceled upon resetting the corresponding class file transformer.
-
-