-
-
Notifications
You must be signed in to change notification settings - Fork 0
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 method to refresh realtime data #25
Comments
Possibly add internal interface method This could open the door to using protected/package-private initializers. ex: instead of copying and pasting the static route initialization across all route implementations, use a single initializer OneMTA/src/main/java/dev/katsute/onemta/MTASchema_Bus.java Lines 107 to 114 in efe23fe
vs protected final String routeID = id;
protected final String routeShortName;
protected final String routeLongName;
protected final String routeDesc;
protected final String routeColor;
protected final String routeTextColor; protected final void init(Route route){
route.routeShortName = row.get(csv.getHeaderIndex("route_short_name"));
...
} |
Only realtime data should be updated, static data should be final. Any arrays should also be regenerated and reassigned, don't update existing arrays. |
First comment method can't be used, protected variables in abstract is not allowed. Instead move update method to the alerts and vehicles array method. Have optional param |
@sinon-bot branch refresh |
New branch created This branch was created by @Katsute. |
Prerequisites
Feature
Add a new method
.update(inplace?)
to stop, route, and vehicle objects; to allow developers to refresh realtime data without having to make new calls.The
inplace
parameter should be false by default and return a new object to prevent developers from accidentally changing objects that are in use by other concurrent operations.Reason
Prevent redundant calls to the base object and to reduce confusion for developers expecting the realtime data to update everytime they make a call.
The text was updated successfully, but these errors were encountered: