Search in sources :

Example 11 with CacheManager

use of com.octo.android.robospice.persistence.CacheManager in project robospice by stephanenicolas.

the class RetrofitGsonSpiceService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) throws CacheCreationException {
    CacheManager cacheManager = new CacheManager();
    cacheManager.addPersister(new GsonRetrofitObjectPersisterFactory(application, getConverter(), getCacheFolder()));
    return cacheManager;
}
Also used : GsonRetrofitObjectPersisterFactory(com.octo.android.robospice.persistence.retrofit.GsonRetrofitObjectPersisterFactory) CacheManager(com.octo.android.robospice.persistence.CacheManager)

Example 12 with CacheManager

use of com.octo.android.robospice.persistence.CacheManager in project robospice by stephanenicolas.

the class RetrofitJackson2SpiceService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) throws CacheCreationException {
    CacheManager cacheManager = new CacheManager();
    cacheManager.addPersister(new RetrofitObjectPersisterFactory(application, getConverter(), getCacheFolder()));
    return cacheManager;
}
Also used : RetrofitObjectPersisterFactory(com.octo.android.robospice.persistence.retrofit.RetrofitObjectPersisterFactory) CacheManager(com.octo.android.robospice.persistence.CacheManager)

Example 13 with CacheManager

use of com.octo.android.robospice.persistence.CacheManager in project robospice by stephanenicolas.

the class GsonSpringAndroidSpiceService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) throws CacheCreationException {
    CacheManager cacheManager = new CacheManager();
    cacheManager.addPersister(new GsonObjectPersisterFactory(application));
    return cacheManager;
}
Also used : GsonObjectPersisterFactory(com.octo.android.robospice.persistence.springandroid.json.gson.GsonObjectPersisterFactory) CacheManager(com.octo.android.robospice.persistence.CacheManager)

Example 14 with CacheManager

use of com.octo.android.robospice.persistence.CacheManager in project robospice by stephanenicolas.

the class XmlSpringAndroidSpiceService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) throws CacheCreationException {
    CacheManager cacheManager = new CacheManager();
    cacheManager.addPersister(new SimpleSerializerObjectPersisterFactory(application));
    return cacheManager;
}
Also used : SimpleSerializerObjectPersisterFactory(com.octo.android.robospice.persistence.springandroid.xml.SimpleSerializerObjectPersisterFactory) CacheManager(com.octo.android.robospice.persistence.CacheManager)

Example 15 with CacheManager

use of com.octo.android.robospice.persistence.CacheManager in project robospice by stephanenicolas.

the class SpiceTestService method createCacheManager.

@Override
public CacheManager createCacheManager(Application application) {
    CacheManager cacheManager = new CacheManager();
    StringPersisterStub stringPersisterStub = new StringPersisterStub(application);
    IntegerPersisterStub integerPersisterStub = new IntegerPersisterStub(application);
    DoubleInMemoryPersisterStub doubleInMemoryPersisterStub = new DoubleInMemoryPersisterStub(application);
    cacheManager.addPersister(stringPersisterStub);
    cacheManager.addPersister(integerPersisterStub);
    cacheManager.addPersister(doubleInMemoryPersisterStub);
    return cacheManager;
}
Also used : IntegerPersisterStub(com.octo.android.robospice.stub.IntegerPersisterStub) CacheManager(com.octo.android.robospice.persistence.CacheManager) DoubleInMemoryPersisterStub(com.octo.android.robospice.stub.DoubleInMemoryPersisterStub) StringPersisterStub(com.octo.android.robospice.stub.StringPersisterStub)

Aggregations

CacheManager (com.octo.android.robospice.persistence.CacheManager)15 InFileBitmapObjectPersister (com.octo.android.robospice.persistence.binary.InFileBitmapObjectPersister)2 JacksonObjectPersisterFactory (com.octo.android.robospice.persistence.googlehttpclient.json.JacksonObjectPersisterFactory)2 JacksonObjectPersisterFactory (com.octo.android.robospice.persistence.springandroid.json.jackson.JacksonObjectPersisterFactory)2 Jackson2ObjectPersisterFactory (com.octo.android.robospice.persistence.springandroid.json.jackson2.Jackson2ObjectPersisterFactory)2 File (java.io.File)2 CacheCreationException (com.octo.android.robospice.persistence.exception.CacheCreationException)1 GsonObjectPersisterFactory (com.octo.android.robospice.persistence.googlehttpclient.json.GsonObjectPersisterFactory)1 Jackson2ObjectPersisterFactory (com.octo.android.robospice.persistence.googlehttpclient.json.Jackson2ObjectPersisterFactory)1 GsonRetrofitObjectPersisterFactory (com.octo.android.robospice.persistence.retrofit.GsonRetrofitObjectPersisterFactory)1 RetrofitObjectPersisterFactory (com.octo.android.robospice.persistence.retrofit.RetrofitObjectPersisterFactory)1 GsonObjectPersisterFactory (com.octo.android.robospice.persistence.springandroid.json.gson.GsonObjectPersisterFactory)1 SimpleSerializerObjectPersisterFactory (com.octo.android.robospice.persistence.springandroid.xml.SimpleSerializerObjectPersisterFactory)1 DoubleInMemoryPersisterStub (com.octo.android.robospice.stub.DoubleInMemoryPersisterStub)1 IntegerPersisterStub (com.octo.android.robospice.stub.IntegerPersisterStub)1 StringPersisterStub (com.octo.android.robospice.stub.StringPersisterStub)1