Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.tomergoldst.android:jobqueue

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.tomergoldst.android:jobqueue

persisted job queue for android

  • 2.0.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

JobQueue

Persisted job queue for android.

Manage your jobs flow by working with a queue. You can create as many queues as you need

Light and easy to use

Dependency

Add a dependency to your app build.gradle

dependencies {
    compile 'com.tomergoldst.android:jobqueue:2.0.1'
}

Instructions

Init JobQueue at your application class onCreate()

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        JobQueue.initialize(this);
    }
}

add a job to queue:

final String NETWORK_QUEUE = "network_queue"
JobTask jobTask = new JobTask("myJobName", "myJobData")
JobQueue.add(NETWORK_QUEUE, jobTask);

pop next job:

JobTask jobTask = JobQueue.pop(NETWORK_QUEUE);

peek on next job:

JobTask jobTask = JobQueue.peek(NETWORK_QUEUE);

remove job from queue:

JobQueue.remove(jobTask);

remove all jobs from queue:

JobQueue.clearQueue(NETWORK_QUEUE);

get all jobs on queue:

List<JobTask> jobs = JobQueue.getJobs(NETWORK_QUEUE);

get all jobs of the same task on queue:

List<JobTask> jobs = JobQueue.getJob(NETWORK_QUEUE, "myJobName");

get queue size:

long size = JobQueue.size(NETWORK_QUEUE);

License

Copyright 2019 Tomer Goldstein

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.

FAQs

Package last updated on 16 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc