use of com.path.android.jobqueue.config.Configuration in project android-priority-jobqueue by path.
the class TwitterApplication method configureJobManager.
private void configureJobManager() {
Configuration configuration = new Configuration.Builder(this).customLogger(new CustomLogger() {
private static final String TAG = "JOBS";
@Override
public boolean isDebugEnabled() {
return true;
}
@Override
public void d(String text, Object... args) {
Log.d(TAG, String.format(text, args));
}
@Override
public void e(Throwable t, String text, Object... args) {
Log.e(TAG, String.format(text, args), t);
}
@Override
public void e(String text, Object... args) {
Log.e(TAG, String.format(text, args));
}
}).minConsumerCount(// always keep at least one consumer alive
1).maxConsumerCount(// up to 3 consumers at a time
3).loadFactor(// 3 jobs per consumer
3).consumerKeepAlive(// wait 2 minute
120).build();
jobManager = new JobManager(this, configuration);
}
Aggregations