Skip to content

Commit

Permalink
clarify behavior of using maxRetryAttempts
Browse files Browse the repository at this point in the history
clean up definition of default idStoreFile value
some format improvement
  • Loading branch information
jrmartino committed Nov 16, 2017
1 parent 9321ac9 commit f0dfe40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class HttpArkIdService implements IdService {
/** The ID prefix to be added. */
private String idPrefix = "";

/** Set a maximum retry attempts value if you want to cap the property setting. -1 means no maximum */
private int maxRetryAttempts = -1;
/** Set a maximum retry attempts value */
private int maxRetryAttempts = 5;

/** User name if using Basic Auth. */
private String userName = "";
Expand All @@ -55,16 +55,18 @@ public class HttpArkIdService implements IdService {
/** String regex to validate an ID against. */
private String idRegex = "";

/**Default file for persistent reserved ID storage
* Should be overridden in the rmap.properties file (idservice.idStoreFile),
* default is included here as a failsafe
* **/
private String idStoreFile = System.getProperty("java.io.tmpdir") + File.pathSeparatorChar + "EZID.cache";
/** File for persistent ID cache storage */
private String idStoreFile;

/** the string name for the cache map **/
private static final String DATA = "ezidData";

/** the MVMap for storing the reserved EZIDs **/
private MVMap<Integer, String> ezids;

/** the maximum number of IDs we would like to have on hand */
private int maxStoreSize=200;

/** indicates whether we have a process running which is replenishing the cache **/
private boolean replenishingCache = false;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/http-arkidservice.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ idservice.userName=apitest
idservice.userPassword=apitest
idservice.idLength=21
idservice.idRegex=ark:\\/\\d{5}\\/[a-z0-9]{10}
idservice.idStoreFile=/tmp/idStoreFile
idservice.idStoreFile=${java.io.tmpdir}/idStoreFile
idservice.maxStoreSize=200

0 comments on commit f0dfe40

Please sign in to comment.