All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.galasa.zosmf.internal.properties.RequestRetry Maven / Gradle / Ivy

There is a newer version: 0.38.0
Show newest version
/*
 * Licensed Materials - Property of IBM
 * 
 * (c) Copyright IBM Corp. 2019.
 */
package dev.galasa.zosmf.internal.properties;

import dev.galasa.framework.spi.ConfigurationPropertyStoreException;
import dev.galasa.framework.spi.cps.CpsProperties;
import dev.galasa.zosmf.ZosmfManagerException;

/**
 * zOSMF Server retry request
 * 
 * @galasa.cps.property
 * 
 * @galasa.name zosmf.server.[imageid].https
 * 
 * @galasa.description The number of times to retry when zOSMF request fails
 * 
 * @galasa.required No
 * 
 * @galasa.default 3
 * 
 * @galasa.valid_values 
 * 
 * @galasa.examples 
 * zosmf.server.request.retry=5
* zosmf.server.SYSA.request.retry=5 * */ public class RequestRetry extends CpsProperties { private static final int DEFAULT_REQUEST_RETRY = 3; public static int get(String imageId) throws ZosmfManagerException { try { String retryString = getStringNulled(ZosmfPropertiesSingleton.cps(), "command", "request.retry", imageId); if (retryString == null) { return DEFAULT_REQUEST_RETRY; } else { return Integer.parseInt(retryString); } } catch (ConfigurationPropertyStoreException e) { throw new ZosmfManagerException("Problem asking the CPS for the zOSMF request retry property for zOS image " + imageId, e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy