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

org.jobrunr.jobs.lambdas.JobLambda Maven / Gradle / Ivy

Go to download

An easy way to perform background processing on the JVM. Backed by persistent storage. Open and free for commercial use.

There is a newer version: 7.4.1
Show newest version
package org.jobrunr.jobs.lambdas;

/**
 * This is a functional interface which represents a lambda that will be parsed by JobRunr.
 * You may not create an actual instance of this class, instead you use it as follows:
 *
 * 
{@code
 *
 *     @Inject
 *     MyService myService;
 *
 *     BackgroundJob.enqueue(myService -> myService.doWork("some argument"))
 * }
*

* or *

{@code
 *
 *     @Inject
 *     MyService myService;
 *
 *     jobScheduler.enqueue(myService -> myService.doWork("some argument"))
 * }
*

* This functional interface allows you to enqueue background jobs while having an actual instance available of your service. * While processing, JobRunr will lookup the actual service in the IoC container or create a new instance using the default constructor. */ @FunctionalInterface public interface JobLambda extends JobRunrJob { void run() throws Exception; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy