https://github.com/zhuinden/command-queue
[ACTIVE] A queue with a single receiver and if there is no receiver, the commands are enqueued.
https://github.com/zhuinden/command-queue
Last synced: about 2 months ago
JSON representation
[ACTIVE] A queue with a single receiver and if there is no receiver, the commands are enqueued.
- Host: GitHub
- URL: https://github.com/zhuinden/command-queue
- Owner: Zhuinden
- License: apache-2.0
- Created: 2018-09-13T09:23:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T14:23:47.000Z (almost 4 years ago)
- Last Synced: 2024-10-26T21:34:54.855Z (7 months ago)
- Language: Java
- Homepage:
- Size: 206 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Command Queue
The command queue lets you register a single receiver, and while there is no receiver, the commands are enqueued.
## Using Command Queue
In order to use Command Queue, you need to add jitpack to your project root gradle:
buildscript {
repositories {
// ...
maven { url "https://jitpack.io" }
}
// ...
}
allprojects {
repositories {
// ...
maven { url "https://jitpack.io" }
}
// ...
}In newer projects, you need to also update the `settings.gradle` file's `dependencyResolutionManagement` block:
```
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // <--
jcenter() // Warning: this repository is going to shut down soon
}
}
```and add the dependency to your module level gradle.
implementation 'com.github.Zhuinden:command-queue:1.2.0'
## Sample code
See sample [here](https://github.com/Zhuinden/command-queue/tree/302edf809545e912c38db0865164f418d24f38d0/command-queue-sample).
Please note that CommandQueue is used as internal implementation detail for both `EventEmitter` and `LiveEvent`, if those suit your needs better.
## License
Copyright 2018 Gabor Varadi
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 athttp://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.