Skip to content

Commit

Permalink
Deprecate the Map-based JobRepository and JobExplorer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fmbenhassine committed Sep 16, 2020
1 parent 264243b commit 0958cf4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -31,8 +31,13 @@
* {@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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -34,8 +34,12 @@
* @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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -35,7 +35,11 @@

/**
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -35,7 +35,11 @@

/**
* 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 = ".*";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@

/**
* 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<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -39,7 +39,12 @@
* 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;
Expand Down

0 comments on commit 0958cf4

Please sign in to comment.