-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Feature request: Make ticker class serializable or mutable #9
Comments
Ticker is not meant as a DTO but a VO. Consumers should wrap or translate
|
Thinking out loud here... Making it serializable does indeed lock the class's structure making previous versions incompatible. Here's a link: http://docs.oracle.com/javase/6/docs/platform/serialization/spec/version.html#6678. However, as new versions of XChange roll out, with perhaps updated (and non backwards compatible) DTO objects, it doesn't mean that we are obligated to maintain compatibility at all. I'd say making them all serializable is fine if it makes things more convenient for end users. They just cannot expect compatibility, that's all. If they want that, then they need to wrap the data in their own way. While it may be convenient for them now, they may be in for a surprise later. Actually, Gary is probably right on this. The DTOs WILL change, so it's probably better for the DTOs to be wrapped/translated. I'm also against making the DTOs non final because there are many benefits to making them final: http://www.javapractices.com/topic/TopicAction.do?Id=29 Aido, You could pretty easily create your own serializable class and pass the Ticker DTO to it's constructor, scraping the data you want to keep. |
Both fair comments |
bitso related changes id Done
….1.65.Final Bump netty-all from 4.1.64.Final to 4.1.65.Final
Huobi currency transformation from Huobi utils
1. Bitmex after reconnect login is not attempted
This is a request to make the Ticker class serializable so that ticker data may be saved to file.
If you do not wish to make it serializable than maybe change Ticker class to not be final so that it can be extended.
Thanks.
The text was updated successfully, but these errors were encountered: