Class SimpleTaskScheduler
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.SimpleTaskScheduler
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class SimpleTaskScheduler extends java.lang.Object implements java.io.CloseableScheduler for simple and short tasks
-
-
Constructor Summary
Constructors Constructor Description SimpleTaskScheduler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the resources at best effort.voidschedule(java.lang.String name, java.time.Duration delay, java.lang.Runnable task)voidschedulePeriodic(java.lang.String name, java.time.Duration interval, java.lang.Runnable task)booleanunschedule(java.lang.String name)
-
-
-
Method Detail
-
schedule
public void schedule(java.lang.String name, java.time.Duration delay, java.lang.Runnable task)
-
schedulePeriodic
public void schedulePeriodic(java.lang.String name, java.time.Duration interval, java.lang.Runnable task)
-
unschedule
public boolean unschedule(java.lang.String name)
-
close
public void close()
Close the resources at best effort. The action is uninterruptible, but the interruption status is restore.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-