Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.AtFixedRate
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.AtFixedRate
-
- All Implemented Interfaces:
AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
- Enclosing interface:
- AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
@Enhance public static class AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.AtFixedRate extends java.lang.Object implements AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
A resubmission scheduler that schedules jobs at a fixed rate.
-
-
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 between schedulings.private java.util.concurrent.TimeUnit
timeUnit
The time's time unit.
-
Constructor Summary
Constructors Constructor Description AtFixedRate(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long time, java.util.concurrent.TimeUnit timeUnit)
Creates a new resubmission scheduler which schedules executions at a fixed rate.
-
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 between schedulings.
-
timeUnit
private final java.util.concurrent.TimeUnit timeUnit
The time's time unit.
-
-
Constructor Detail
-
AtFixedRate
public AtFixedRate(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long time, java.util.concurrent.TimeUnit timeUnit)
Creates a new resubmission scheduler which schedules executions at a fixed rate.- Parameters:
scheduledExecutorService
- The executor service to schedule to.time
- The time interval between schedulings.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.
-
-