Package org.drasyl.util.scheduler
Class DrasylScheduler
- java.lang.Object
-
- io.reactivex.rxjava3.core.Scheduler
-
- org.drasyl.util.scheduler.DrasylScheduler
-
public class DrasylScheduler extends io.reactivex.rxjava3.core.Scheduler
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Scheduler.Worker
createWorker()
boolean
isCalledFromThisScheduler()
This method returnstrue
if the method was called from this scheduler.long
now(TimeUnit unit)
io.reactivex.rxjava3.disposables.Disposable
scheduleDirect(Runnable run)
io.reactivex.rxjava3.disposables.Disposable
scheduleDirect(Runnable run, long delay, TimeUnit unit)
io.reactivex.rxjava3.disposables.Disposable
schedulePeriodicallyDirect(Runnable run, long initialDelay, long period, TimeUnit unit)
void
shutdown()
void
start()
<S extends io.reactivex.rxjava3.core.Scheduler & io.reactivex.rxjava3.disposables.Disposable>
Swhen(io.reactivex.rxjava3.functions.Function<io.reactivex.rxjava3.core.Flowable<io.reactivex.rxjava3.core.Flowable<io.reactivex.rxjava3.core.Completable>>,io.reactivex.rxjava3.core.Completable> combine)
static DrasylScheduler
wrap(io.reactivex.rxjava3.core.Scheduler scheduler, String schedulerNamePrefix)
Wraps the givenscheduler
and returns aDrasylScheduler
instance.
-
-
-
Method Detail
-
wrap
public static DrasylScheduler wrap(io.reactivex.rxjava3.core.Scheduler scheduler, String schedulerNamePrefix)
Wraps the givenscheduler
and returns aDrasylScheduler
instance.- Parameters:
scheduler
- reactivex.rxjava3 schedulerschedulerNamePrefix
- the scheduler name prefix- Returns:
- wrapped scheduler
-
isCalledFromThisScheduler
public boolean isCalledFromThisScheduler()
This method returnstrue
if the method was called from this scheduler.- Returns:
- true if the method was called from this scheduler
-
createWorker
@NonNull public io.reactivex.rxjava3.core.Scheduler.Worker createWorker()
- Specified by:
createWorker
in classio.reactivex.rxjava3.core.Scheduler
-
now
public long now(@NonNull TimeUnit unit)
- Overrides:
now
in classio.reactivex.rxjava3.core.Scheduler
-
start
public void start()
- Overrides:
start
in classio.reactivex.rxjava3.core.Scheduler
-
shutdown
public void shutdown()
- Overrides:
shutdown
in classio.reactivex.rxjava3.core.Scheduler
-
scheduleDirect
@NonNull public io.reactivex.rxjava3.disposables.Disposable scheduleDirect(@NonNull Runnable run)
- Overrides:
scheduleDirect
in classio.reactivex.rxjava3.core.Scheduler
-
scheduleDirect
@NonNull public io.reactivex.rxjava3.disposables.Disposable scheduleDirect(@NonNull Runnable run, long delay, @NonNull TimeUnit unit)
- Overrides:
scheduleDirect
in classio.reactivex.rxjava3.core.Scheduler
-
schedulePeriodicallyDirect
@NonNull public io.reactivex.rxjava3.disposables.Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit)
- Overrides:
schedulePeriodicallyDirect
in classio.reactivex.rxjava3.core.Scheduler
-
when
@NonNull public <S extends io.reactivex.rxjava3.core.Scheduler & io.reactivex.rxjava3.disposables.Disposable> S when(@NonNull io.reactivex.rxjava3.functions.Function<io.reactivex.rxjava3.core.Flowable<io.reactivex.rxjava3.core.Flowable<io.reactivex.rxjava3.core.Completable>>,io.reactivex.rxjava3.core.Completable> combine)
- Overrides:
when
in classio.reactivex.rxjava3.core.Scheduler
-
-