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

org.jobrunr.server.configuration.DefaultConcurrentJobModificationPolicy 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.3.1
Show newest version
package org.jobrunr.server.configuration;

import org.jobrunr.server.BackgroundJobServer;
import org.jobrunr.server.concurrent.ConcurrentJobModificationResolver;
import org.jobrunr.server.concurrent.DefaultConcurrentJobModificationResolver;
import org.jobrunr.server.concurrent.UnresolvableConcurrentJobModificationException;

/**
 * Default implementation of {@link ConcurrentJobModificationPolicy}.
 * 

* If Jobs are deleted, the {@link DefaultConcurrentJobModificationPolicy} will resolve the concurrent job modification * by stopping the processing of the job. For other concurrent modifications, the {@link DefaultConcurrentJobModificationPolicy} will * throw {@link UnresolvableConcurrentJobModificationException} as these may point to programming errors (JobRunr was conceived with the idea that once a * job is being processed, it should not be modified anymore). */ public class DefaultConcurrentJobModificationPolicy implements ConcurrentJobModificationPolicy { @Override public ConcurrentJobModificationResolver toConcurrentJobModificationResolver(BackgroundJobServer backgroundJobServer) { return new DefaultConcurrentJobModificationResolver(backgroundJobServer); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy