Deprecate the Map-based JobRepository and JobExplorer

This commit deprecates the Map-based JobRepository
and JobExplorer factory beans with the associated
DAOs in favor of using the JDBC-based implementations
with an in-memory database.

Resolves #3780
This commit is contained in:
Mahmoud Ben Hassine
2020-09-16 14:47:05 +02:00
parent 264243b73c
commit 0958cf4f3d
6 changed files with 31 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013 the original author or authors.
* Copyright 2006-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,8 +31,13 @@ import org.springframework.util.Assert;
* {@link SimpleJobExplorer} using in-memory DAO implementations.
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @since 2.0
*
* @deprecated as of v4.3 in favor of using the {@link JobExplorerFactoryBean}
* with an in-memory database. Scheduled for removal in v5.0.
*/
@Deprecated
public class MapJobExplorerFactoryBean extends AbstractJobExplorerFactoryBean implements InitializingBean {
private MapJobRepositoryFactoryBean repositoryFactory;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2018 the original author or authors.
* Copyright 2006-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,8 +34,12 @@ import org.springframework.util.SerializationUtils;
* @author Dave Syer
* @author David Turanski
* @author Mahmoud Ben Hassine
*
* @deprecated as of v4.3 in favor of using the {@link JdbcExecutionContextDao}
* with an in-memory database. Scheduled for removal in v5.0.
*/
@SuppressWarnings("serial")
@Deprecated
public class MapExecutionContextDao implements ExecutionContextDao {
private final ConcurrentMap<ContextKey, ExecutionContext> contexts = TransactionAwareProxyFactory

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2019 the original author or authors.
* Copyright 2006-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,11 @@ import org.springframework.util.SerializationUtils;
/**
* In-memory implementation of {@link JobExecutionDao}.
*
* @deprecated as of v4.3 in favor of using the {@link JdbcJobExecutionDao}
* with an in-memory database. Scheduled for removal in v5.0.
*/
@Deprecated
public class MapJobExecutionDao implements JobExecutionDao {
// JDK6 Make this into a ConcurrentSkipListMap: adds and removes tend to be very near the front or back

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2019 the original author or authors.
* Copyright 2006-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,11 @@ import org.springframework.util.Assert;
/**
* In-memory implementation of {@link JobInstanceDao}.
*
* @deprecated as of v4.3 in favor of using the {@link JdbcJobInstanceDao}
* with an in-memory database. Scheduled for removal in v5.0.
*/
@Deprecated
public class MapJobInstanceDao implements JobInstanceDao {
private static final String STAR_WILDCARD = "\\*";
private static final String STAR_WILDCARD_PATTERN = ".*";

View File

@@ -37,7 +37,11 @@ import org.springframework.util.SerializationUtils;
/**
* In-memory implementation of {@link StepExecutionDao}.
*
* @deprecated as of v4.3 in favor of using the {@link JdbcStepExecutionDao}
* with an in-memory database. Scheduled for removal in v5.0.
*/
@Deprecated
public class MapStepExecutionDao implements StepExecutionDao {
private Map<Long, Map<Long, StepExecution>> executionsByJobExecutionId = new ConcurrentHashMap<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2014 the original author or authors.
* Copyright 2006-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,12 @@ import org.springframework.transaction.PlatformTransactionManager;
* multi-threaded step.
*
* @author Robert Kasanicky
* @author Mahmoud Ben Hassine
*
* @deprecated as of v4.3 in favor or using the {@link JobRepositoryFactoryBean}
* with an in-memory database. Scheduled for removal in v5.0.
*/
@Deprecated
public class MapJobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean {
private MapJobExecutionDao jobExecutionDao;