-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Description
It's not obvious which time unit the expiration parameter in com.google.code.ssm.spring.SSMCache is: seconds or milliseconds.
It would be helpful if this could be stated clearly in the javadoc on constructor and getters/setters.
As the field is an int, it might be seconds, as that seems to be a quiet practice throughout Javaland.
However, digging through the callstack, I eventually end up in net.rubyeye.xmemcached.XMemcachedClient#sendStoreCommand(Command, long), where our value suddenly becomes long, and where its unit is unequivocally used as milliseconds.
if (cmd.getLatch().await(timeout, TimeUnit.MILLISECONDS))
An alternative or possible feature addition to documenting in javadoc would be to allow passing a TimeUnit instance to require the user to explicitly specify the TimeUnit they require.