-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove Cache wrapper. - Use default namespace for ehcache.xml
- Loading branch information
rathnapandi
committed
Mar 11, 2024
1 parent
4c13616
commit 0a03578
Showing
5 changed files
with
161 additions
and
273 deletions.
There are no files selected for viewing
99 changes: 0 additions & 99 deletions
99
modules/apim-adapter/src/main/java/com/axway/apim/lib/APIMCLICache.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 44 additions & 44 deletions
88
modules/apim-adapter/src/main/java/com/axway/apim/lib/StandardImportParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
package com.axway.apim.lib; | ||
|
||
import com.axway.apim.adapter.CacheType; | ||
import java.util.Collections; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class StandardImportParams extends CoreParameters { | ||
|
||
private static final Logger LOG = LoggerFactory.getLogger(StandardImportParams.class); | ||
private static final Logger LOG = LoggerFactory.getLogger(StandardImportParams.class); | ||
|
||
private String config; | ||
private String config; | ||
|
||
private String stageConfig; | ||
private String stageConfig; | ||
|
||
private String enabledCaches; | ||
private String enabledCaches; | ||
|
||
private List<CacheType> enabledCacheTypes = null; | ||
private List<CacheType> enabledCacheTypes = null; | ||
|
||
public String getConfig() { | ||
return config; | ||
} | ||
public String getConfig() { | ||
return config; | ||
} | ||
|
||
public void setConfig(String config) { | ||
this.config = config; | ||
} | ||
public void setConfig(String config) { | ||
this.config = config; | ||
} | ||
|
||
public String getStageConfig() { | ||
return stageConfig; | ||
} | ||
public String getStageConfig() { | ||
return stageConfig; | ||
} | ||
|
||
public void setStageConfig(String stageConfig) { | ||
this.stageConfig = stageConfig; | ||
} | ||
public void setStageConfig(String stageConfig) { | ||
this.stageConfig = stageConfig; | ||
} | ||
|
||
public static synchronized StandardImportParams getInstance() { | ||
return (StandardImportParams)CoreParameters.getInstance(); | ||
} | ||
public static synchronized StandardImportParams getInstance() { | ||
return (StandardImportParams) CoreParameters.getInstance(); | ||
} | ||
|
||
@Override | ||
public boolean isIgnoreCache() { | ||
// Caches are disabled for import actions if not explicitly enabled | ||
return getEnabledCaches() == null || super.isIgnoreCache(); | ||
} | ||
@Override | ||
public boolean isIgnoreCache() { | ||
// Caches are disabled for import actions if not explicitly enabled | ||
return getEnabledCaches() == null || super.isIgnoreCache(); | ||
} | ||
|
||
public String getEnabledCaches() { | ||
return enabledCaches; | ||
} | ||
public String getEnabledCaches() { | ||
return enabledCaches; | ||
} | ||
|
||
public List<CacheType> getEnabledCacheTypes() { | ||
if(isIgnoreCache()) return Collections.emptyList(); | ||
if(getEnabledCaches()==null) return Collections.emptyList(); | ||
if(enabledCacheTypes!=null) return enabledCacheTypes; | ||
enabledCacheTypes = createCacheList(getEnabledCaches()); | ||
LOG.warn("Using caches for Import-Actions is BETA. Enable only as many caches as necessary to improve performance and monitor behavior closely. Please read: https://bit.ly/3FjXRXE"); | ||
return enabledCacheTypes; | ||
} | ||
public List<CacheType> getEnabledCacheTypes() { | ||
if (isIgnoreCache()) return Collections.emptyList(); | ||
if (getEnabledCaches() == null) return Collections.emptyList(); | ||
if (enabledCacheTypes != null) return enabledCacheTypes; | ||
enabledCacheTypes = createCacheList(getEnabledCaches()); | ||
LOG.warn("Using caches for Import-Actions is BETA. Enable only as many caches as necessary to improve performance and monitor behavior closely. Please read: https://bit.ly/3FjXRXE"); | ||
return enabledCacheTypes; | ||
} | ||
|
||
public void setEnabledCaches(String enabledCaches) { | ||
this.enabledCaches = enabledCaches; | ||
} | ||
public void setEnabledCaches(String enabledCaches) { | ||
this.enabledCaches = enabledCaches; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "[" + super.toString() + ", config=" + config + "]"; | ||
} | ||
@Override | ||
public String toString() { | ||
return "[" + super.toString() + ", config=" + config + "]"; | ||
} | ||
} |
Oops, something went wrong.