Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/org/dive4elements/artifactdatabase/DatabaseCleaner.java @ 570:584591f8203c 3.2.x
Upgrade to Log4j 2
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 28 Feb 2022 17:41:14 +0100 |
parents | 266b599a4819 |
children |
comparison
equal
deleted
inserted
replaced
569:2b40f4bf190d | 570:584591f8203c |
---|---|
24 import java.util.List; | 24 import java.util.List; |
25 import java.util.Set; | 25 import java.util.Set; |
26 import java.util.HashSet; | 26 import java.util.HashSet; |
27 import java.util.Collections; | 27 import java.util.Collections; |
28 | 28 |
29 import org.apache.log4j.Logger; | 29 import org.apache.logging.log4j.Logger; |
30 import org.apache.logging.log4j.LogManager; | |
30 | 31 |
31 /** | 32 /** |
32 * The database cleaner runs in background. It sleep for a configurable | 33 * The database cleaner runs in background. It sleep for a configurable |
33 * while and when it wakes up it removes outdated artifacts from the | 34 * while and when it wakes up it removes outdated artifacts from the |
34 * database. Outdated means that the the last access to the artifact | 35 * database. Outdated means that the the last access to the artifact |
66 | 67 |
67 public interface LockedIdsProvider { | 68 public interface LockedIdsProvider { |
68 Set<Integer> getLockedIds(); | 69 Set<Integer> getLockedIds(); |
69 } // interface LockedIdsProvider | 70 } // interface LockedIdsProvider |
70 | 71 |
71 private static Logger logger = Logger.getLogger(DatabaseCleaner.class); | 72 private static Logger logger = LogManager.getLogger(DatabaseCleaner.class); |
72 | 73 |
73 /** | 74 /** |
74 * Number of artifacts to be loaded at once. Used to | 75 * Number of artifacts to be loaded at once. Used to |
75 * mitigate the problem of a massive denial of service | 76 * mitigate the problem of a massive denial of service |
76 * if too many artifacts have died since last cleanup. | 77 * if too many artifacts have died since last cleanup. |