}
@Override
public CNonceCache createCNonceCache(String appName, String clusterName, String instanceName, String storeName) {
boolean haEnabled = (clusterName != null) && (instanceName != null) && (storeName != null);
CNonceCache cache = null;
Map<String, String> map = new HashMap<String, String>();
if (haEnabled) {
cache = cHANonceCacheProvider.get();
map.put(CLUSTER_NAME_PROP, clusterName);
map.put(INSTANCE_NAME_PROP, instanceName);
} else {
cache = cNonceCacheProvider.get();
}
if (cache != null) {
cache.init(cnonceCacheSize, storeName, nonceValidity, map);
}
return cache;
}