62

GitHub - MindorksOpenSource/RxJavaPriorityScheduler: RxPS - RxJavaPrioritySchedu...

 5 years ago
source link: https://github.com/MindorksOpenSource/RxJavaPriorityScheduler
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

PRDownloader

RxPS - RxJavaPriorityScheduler - A RxJava Priority Scheduler library for Android and Java applications

Mindorks Mindorks Community License

Overview of RxPS - RxJavaPriorityScheduler library

  • RxPS is used to set the priority for the given task.
  • Simple way to set the priority for the given task.

Using RxPS - RxJavaPriorityScheduler Library in your Android application

Add this in your build.gradle

implementation 'com.mindorks.scheduler:rxps:0.1.0'

Setting low level priority for a task - use RxPS.low()

getObservable()
.subscribeOn(RxPS.low())
.subscribe(getObserver());

// or

getObservable()
.subscribeOn(RxPS.get(Priority.LOW))
.subscribe(getObserver());

Setting medium level priority for a task - use RxPS.medium()

getObservable()
.subscribeOn(RxPS.medium())
.subscribe(getObserver());

// or

getObservable()
.subscribeOn(RxPS.get(Priority.MEDIUM))
.subscribe(getObserver());

Setting high level priority for a task - use RxPS.high()

getObservable()
.subscribeOn(RxPS.high())
.subscribe(getObserver());

// or

getObservable()
.subscribeOn(RxPS.get(Priority.HIGH))
.subscribe(getObserver());

Setting immediate level priority for a task - use RxPS.immediate()

getObservable()
.subscribeOn(RxPS.immediate())
.subscribe(getObserver());

// or

getObservable()
.subscribeOn(RxPS.get(Priority.IMMEDIATE))
.subscribe(getObserver());

TODO

  • Documentation
  • Test Cases
  • Customizations

If this library helps you in anyway, show your love ❤️ by putting a ⭐️ on this project ✌️

Check out Mindorks awesome open source projects here

License

    Copyright (C) 2018 MINDORKS NEXTGEN PRIVATE LIMITED

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

Contributing to RxPS - RxJavaPriorityScheduler

All pull requests are welcome, make sure to follow the contribution guidelines when you submit pull request.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK