Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add units to time spans. #126

Open
MicahZoltu opened this issue Jan 25, 2016 · 2 comments
Open

Add units to time spans. #126

MicahZoltu opened this issue Jan 25, 2016 · 2 comments

Comments

@MicahZoltu
Copy link

https://github.com/scassandra/scassandra-server/blob/master/java-client/src/main/java/org/scassandra/http/client/PrimingRequest.java#L270

fixedDelay has no units in the variable name and just wants a long. If targeting Java 8, I recommend taking a Duration instead (so you don't need to worry about units). If targeting Java 7 or lower then I recommend either taking a TimeUnit parameter as well or changing the name everywhere to fixedDelayInMilliseconds or fixedDelayInSeconds or fixedDelayInFortnights.

@MicahZoltu
Copy link
Author

Also, what are the units? Milliseconds?

@chbatey
Copy link
Member

chbatey commented Jan 28, 2016

yes it is milliseconds. FYI the Java API is a wrapper around a JSON/HTTP API, so we could use duration or timeunit but would require some serialisation on the Java side and then on the Scala server side into a Scala Duration. I don't have anytime to work on this atm but will happily review a PR. Beware the API needs to be backward compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants