本文整理汇总了Java中com.path.android.jobqueue.config.Configuration类的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Configuration类属于com.path.android.jobqueue.config包,在下文中一共展示了Configuration类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: jobManager
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Provides
@Singleton
public JobManager jobManager() {
Configuration config = new Configuration.Builder(mApp)
.consumerKeepAlive(45)
.maxConsumerCount(3)
.minConsumerCount(1)
.customLogger(L.getJobLogger())
.injector(new DependencyInjector() {
@Override
public void inject(Job job) {
if (job instanceof BaseJob) {
((BaseJob) job).inject(mApp.getAppComponent());
}
}
})
.build();
return new JobManager(mApp, config);
}
开发者ID:yigit,项目名称:dev-summit-architecture-demo,代码行数:20,代码来源:ApplicationModule.java
示例2: onCreate
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
try {
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
VERSIONNAME = pInfo.versionName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
Storage.deleteTemp(); //Start clean every time!!
VaultHolder.getInstance().clear();
Configuration configuration = new Configuration.Builder(this)
.minConsumerCount(1)//always keep at least one consumer alive
.maxConsumerCount(1)//up to 1 consumers at a time
.loadFactor(1)//1 jobs per consumer
.networkUtil(new NetworkUtilImpl(this))
.build();
jobManager = new JobManager(this, configuration);
}
开发者ID:SecrecySupportTeam,项目名称:secrecy,代码行数:24,代码来源:CustomApp.java
示例3: provideJobManager
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Provides @Singleton public JobManager provideJobManager(@ForApplication Context context) {
Configuration config = new Configuration.Builder(context).minConsumerCount(MIN_CONSUMER_COUNT)
.maxConsumerCount(MAX_CONSUMER_COUNT)
.loadFactor(LOAD_FACTOR)
.build();
return new JobManager(context, config);
}
开发者ID:pinicius,项目名称:CAS2016,代码行数:8,代码来源:RosieAndroidModule.java
示例4: onCreate
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
context = this.getApplicationContext();
Configuration config = new Configuration.Builder(this).maxConsumerCount(1).build();
jobManager = new JobManager(this, config);
}
开发者ID:CMPUT301W16T15,项目名称:Shareo,代码行数:8,代码来源:ShareoApplication.java
示例5: onCreate
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void onCreate() {
super.onCreate();
Configuration configuration = new Configuration.Builder(this)
.minConsumerCount(1)
.maxConsumerCount(3)
.loadFactor(3)
.consumerKeepAlive(120)
.build();
jobManager = new JobManager(this, configuration);
}
开发者ID:CMPUT301F15T03,项目名称:301p,代码行数:17,代码来源:TradeApp.java
示例6: configureJobManager
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
/**
* Configurazione del JobManager per il sistema di code
*/
private void configureJobManager() {
Configuration configuration = new Configuration.Builder(this)
.minConsumerCount(1)// always keep at least one consumer alive
.maxConsumerCount(3)// up to 3 consumers at a time
.loadFactor(3)// 3 jobs per consumer
.consumerKeepAlive(120)// wait 2 minute
.build();
jobManager = new JobManager(this, configuration);
}
开发者ID:guglielmino,项目名称:pushetta-android-app,代码行数:13,代码来源:PushettaApplication.java
示例7: provideJobManager
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Provides
@ForActivity
@Singleton
JobManager provideJobManager() {
Configuration config = new Configuration.Builder(activity)
.injector(new DependencyInjector() {
@Override
public void inject(BaseJob baseJob) {
activity.inject(baseJob);
}
})
.id("MainActivity")
.build();
return new JobManager(activity, config);
}
开发者ID:nguyenhuy,项目名称:buffer,代码行数:16,代码来源:MainActivityModule.java
示例8: provideJobManager
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Provides
@Singleton
@ForActivity
JobManager provideJobManager() {
Configuration config = new Configuration.Builder(activity)
.injector(new DependencyInjector() {
@Override
public void inject(BaseJob baseJob) {
activity.inject(baseJob);
}
})
.id("LoginActivity")
.build();
return new JobManager(activity, config);
}
开发者ID:nguyenhuy,项目名称:buffer,代码行数:16,代码来源:LoginActivityModule.java
示例9: provideJobManager
import com.path.android.jobqueue.config.Configuration; //导入依赖的package包/类
@Provides @Singleton
public JobManager provideJobManager(Configuration configuration) {
return new JobManager(mApplicationContext, configuration);
}
开发者ID:jetpeter,项目名称:imgur-auto-uploader,代码行数:5,代码来源:UtilsModule.java
注:本文中的com.path.android.jobqueue.config.Configuration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论