PDFGGlobalCache.java
1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.pdfg.exception.JobOptionsParseException
* com.adobe.pdfg.logging.PDFGLogger
*/
package com.adobe.pdfg.common;
import com.adobe.pdfg.common.FiniteSizedCache;
import com.adobe.pdfg.common.IObjectRetriever;
import com.adobe.pdfg.common.JobConfiguration;
import com.adobe.pdfg.common.JobConfigurationRetriever;
import com.adobe.pdfg.common.JobOptionsRetriever;
import com.adobe.pdfg.exception.JobOptionsParseException;
import com.adobe.pdfg.logging.PDFGLogger;
import java.util.Map;
import javax.xml.bind.JAXBException;
public class PDFGGlobalCache {
private static final int JOB_OPTIONS_CACHE_SIZE = 20;
private static final int JOB_CONFIG_CACHE_SIZE = 20;
private static FiniteSizedCache s_JobOptionsCache = new FiniteSizedCache(20, new JobOptionsRetriever());
private static FiniteSizedCache s_JobConfigCache = new FiniteSizedCache(20, new JobConfigurationRetriever());
private static PDFGLogger pdfgLogger = PDFGLogger.getPDFGLogger(PDFGGlobalCache.class);
private PDFGGlobalCache() {
}
public static Map getJobOptionsMap(String jobOptions) throws JobOptionsParseException {
try {
return (Map)s_JobOptionsCache.retrieve(jobOptions);
}
catch (Exception e) {
pdfgLogger.trace(e.getMessage(), null, (Throwable)e);
throw new JobOptionsParseException(e.getMessage());
}
}
public static JobConfiguration getJobConfiguration(String configString) throws JAXBException {
try {
return (JobConfiguration)s_JobConfigCache.retrieve(configString);
}
catch (Exception e) {
throw new JAXBException(e);
}
}
}