All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shinitech.djammadev.jobs.CancellableJob Maven / Gradle / Ivy

package com.shinitech.djammadev.jobs;

import akka.actor.Cancellable;

public class CancellableJob implements Cancellable {
    private final Cancellable underline;
    private final Job job;

    public CancellableJob(Cancellable underline, Job job) {
        this.underline = underline;
        this.job = job;
    }

    @Override
    public boolean cancel() {
        boolean cancelled = this.underline.cancel();
        this.job.stopJob();
        return cancelled;
    }

    @Override
    public boolean isCancelled() {
        return this.underline.isCancelled();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy