io.ebean.backgroundexecutor.IgnoreBackgroundExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean-mocker Show documentation
Show all versions of ebean-mocker Show documentation
Ability to set a Mockito mock EbeanServer as 'default' EbeanServer
package io.ebean.backgroundexecutor;
import io.ebean.BackgroundExecutor;
import java.util.concurrent.TimeUnit;
/**
* Implementation that ignores execution requests.
*
* In the case of running tests usually you want the background task
* to bulkUpdate immediately or not at all.
*/
public class IgnoreBackgroundExecutor implements BackgroundExecutor {
@Override
public void execute(Runnable r) {
// just ignore
}
@Override
public void executePeriodically(Runnable r, long delay, TimeUnit unit) {
// just ignore
}
}