当前位置: 首页>>代码示例>>Java>>正文


Java FlowManager.destroy方法代码示例

本文整理汇总了Java中com.raizlabs.android.dbflow.config.FlowManager.destroy方法的典型用法代码示例。如果您正苦于以下问题:Java FlowManager.destroy方法的具体用法?Java FlowManager.destroy怎么用?Java FlowManager.destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.raizlabs.android.dbflow.config.FlowManager的用法示例。


在下文中一共展示了FlowManager.destroy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepare

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
public static TestComponent prepare(App app) {
    FlowManager.destroy();
    resetSingleton(FlowManager.class, "mDatabaseHolder");
    ApplicationModule appModule = new ApplicationModule(app) {
        @Override
        public EventBus eventBus() {
            return new LoggingBus();
        }
        @Provides
        @Singleton
        public JobManager jobManager() {
            JobManager mock = mock(JobManager.class);
            when(mock.addJob(any(Job.class))).thenReturn(1L);
            return mock;
        }
    };
    TestComponent testComponent = DaggerTestComponent.builder()
            .testApplicationModule(new TestApplicationModule())
            .applicationModule(appModule)
            .build();
    testComponent.appContext().deleteDatabase(DemoDatabase.NAME + ".db");
    FlowManager.init(app);
    testComponent.feedModel().clear();
    testComponent.loggingBus().clear();
    return testComponent;
}
 
开发者ID:yigit,项目名称:dev-summit-architecture-demo,代码行数:27,代码来源:TestUtil.java

示例2: teardown

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void teardown() {
    executors.shutdown();

    // DBFlow doesn't automatically close its database handle when a test ends.
    // https://github.com/robolectric/robolectric/issues/1890#issuecomment-218880541
    FlowManager.destroy();
}
 
开发者ID:aarmea,项目名称:noise,代码行数:9,代码来源:StreamSyncTest.java

示例3: dispose

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
public static void dispose() {
    // ThreadPool
    stopThreadPool();

    // Network
    stopRequestQueue();

    // DB Flow destroy
    FlowManager.destroy();
    APPLICATION = null;
}
 
开发者ID:qiujuer,项目名称:UPMiss,代码行数:12,代码来源:Model.java

示例4: pullFromDB

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
private void pullFromDB(Context context,
        InputStream inputStream) throws IOException {
    Log.d(TAG, "Copy Database from assets started");
    FlowManager.destroy();
    copyDBFromAssets(inputStream);
    reinitializeDbFlowDatabases(context);
    Log.d(TAG, "Copy Database from assets finished");
}
 
开发者ID:EyeSeeTea,项目名称:malariapp,代码行数:9,代码来源:LocalPullController.java

示例5: tearDown

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void tearDown() throws Exception {
    FlowManager.destroy();
    getTargetContext().deleteDatabase(FlowDatabase.NAME + ".db");

    super.tearDown();
}
 
开发者ID:greenrobot,项目名称:android-database-performance,代码行数:8,代码来源:PerfTestDbFlow.java

示例6: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
    super.onTerminate();
    FlowManager.destroy();
    application = null;
    context = null;
}
 
开发者ID:markzhai,项目名称:LyricHere,代码行数:8,代码来源:LHApplication.java

示例7: getResponseObject

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public TrackerExportResponse getResponseObject() {
    FlowManager.init(this);
    List<TrackedEntityInstance> trackedEntityInstances = new Select().from(TrackedEntityInstance.class).queryList();
    List<Enrollment> enrollments = new Select().from(Enrollment.class).queryList();
    List<Event> events = new Select().from(Event.class).queryList();
    FlowManager.destroy();
    return TrackerExportResponse.build(trackedEntityInstances, enrollments, events);
}
 
开发者ID:dhis2,项目名称:dhis2-android-trackercapture,代码行数:10,代码来源:TrackerExportService.java

示例8: DBTearDown

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
private void DBTearDown() {
    FlowManager.destroy();
}
 
开发者ID:micromasterandroid,项目名称:androidadvanced,代码行数:4,代码来源:FacebookRecipesApp.java

示例9: teardown

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void teardown() {
    // DBFlow doesn't automatically close its database handle when a test ends.
    // https://github.com/robolectric/robolectric/issues/1890#issuecomment-218880541
    FlowManager.destroy();
}
 
开发者ID:aarmea,项目名称:noise,代码行数:7,代码来源:UnknownMessageTest.java

示例10: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
    FlowManager.destroy();
    super.onTerminate();
}
 
开发者ID:roadhouse-dev,项目名称:RxDbflow,代码行数:6,代码来源:ExampleApplication.java

示例11: tearDown

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
    FlowManager.getDatabase(AppDatabase.NAME).reset(RuntimeEnvironment.application);
    FlowManager.destroy();
}
 
开发者ID:setiawanp,项目名称:sunny-reader,代码行数:6,代码来源:HackerNewsDiskStoreTest.java

示例12: after

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@After
public void after() {
  scroballDB.clear();
  FlowManager.destroy();
}
 
开发者ID:peterjosling,项目名称:scroball,代码行数:6,代码来源:ScroballDBTest.java

示例13: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
    super.onTerminate();            //必须先调用父类的同名方法
    FlowManager.destroy();          //释放DbFlow这个第三方数据库使用的所有资源
}
 
开发者ID:rorschach,项目名称:Diary,代码行数:6,代码来源:MyApplication.java

示例14: freeDatabase

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
private void freeDatabase() {
  FlowManager.destroy();
}
 
开发者ID:tommus,项目名称:rabbitmq-management-android,代码行数:4,代码来源:RabbitMqManagementApplication.java

示例15: onTerminate

import com.raizlabs.android.dbflow.config.FlowManager; //导入方法依赖的package包/类
@Override
public void onTerminate() {
    super.onTerminate();
    FlowManager.destroy();
}
 
开发者ID:EyeSeeTea,项目名称:EDSApp,代码行数:6,代码来源:EyeSeeTeaApplication.java


注:本文中的com.raizlabs.android.dbflow.config.FlowManager.destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。