Package com.illumon.util.net
Class ConnectionScheduler
java.lang.Object
io.deephaven.enterprise.comm.sched.JobScheduler
com.illumon.util.net.ConnectionScheduler
- All Implemented Interfaces:
Scheduler
Create a private scheduler to handle jobs for a single connection.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.enterprise.comm.sched.JobScheduler
JobScheduler.StatisticsNested classes/interfaces inherited from interface io.deephaven.enterprise.niowrapper.sched.Scheduler
Scheduler.ExecutorAdaptor, Scheduler.Null -
Field Summary
Fields inherited from class io.deephaven.enterprise.comm.sched.JobScheduler
log, name -
Constructor Summary
ConstructorsConstructorDescriptionConnectionScheduler(@NotNull String name, @NotNull com.fishlib.io.logger.Logger log, @NotNull JobScheduler.Statistics statistics, int numThreads) Construct a new scheduler designed for use by a single connection, with the supplied name, log, and number of driver threads. -
Method Summary
Modifier and TypeMethodDescriptioncom.fishlib.io.logger.LoggergetLog()Get this scheduler's logprotected voidSubclass hook invoked after the scheduler has transitioned to the closed state and any waiters onJobScheduler.waitForFullyClosed()have been notified.voidstart()Start this scheduler.voidupdateDriverThreadNames(@NotNull String namePrefix) Update the names of the driver threads with a new name prefix, replacing the scheduler's name as a component of the driver thread names.Methods inherited from class io.deephaven.enterprise.comm.sched.JobScheduler
cancelJob, close, currentTimeMillis, installJob, installJob, isClosed, junitGetAllJobs, junitGetAllKeys, junitGetChannelsAndJobs, junitGetReadyKeys, junitGetSelector, junitGetTimeoutQueue, junitTestTimeoutQueueInvariant, waitForFullyClosed, work
-
Constructor Details
-
ConnectionScheduler
public ConnectionScheduler(@NotNull @NotNull String name, @NotNull @NotNull com.fishlib.io.logger.Logger log, @NotNull @NotNull JobScheduler.Statistics statistics, int numThreads) throws IOException Construct a new scheduler designed for use by a single connection, with the supplied name, log, and number of driver threads.- Parameters:
name- The name of the schedulerlog- The log to be used by the schedulerstatistics- Statistics to be reported by the super classnumThreads- The number of driver threads to create- Throws:
IOException
-
-
Method Details
-
updateDriverThreadNames
Update the names of the driver threads with a new name prefix, replacing the scheduler's name as a component of the driver thread names. Does not change the name of the scheduler, which becomes fixed at construction time.- Parameters:
namePrefix- The new name prefix
-
postClose
protected void postClose()Description copied from class:JobSchedulerSubclass hook invoked after the scheduler has transitioned to the closed state and any waiters onJobScheduler.waitForFullyClosed()have been notified. Called exactly once.Implementations must not assume the scheduler is still usable, and should not block for significant time — callers treating this scheduler as closed may already have moved on.
- Overrides:
postClosein classJobScheduler
-
getLog
public com.fishlib.io.logger.Logger getLog()Get this scheduler's log- Returns:
- The log
-
start
public void start()Start this scheduler.
-