Package com.googlecode.objectify.cache
Class CachingDatastoreServiceFactory
java.lang.Object
com.googlecode.objectify.cache.CachingDatastoreServiceFactory
public class CachingDatastoreServiceFactory extends Object
A convenience class with factory methods to create caching versions of DatastoreService and AsyncDatastoreService. These are just shortcuts for common cases - do not be afraid to use the constructors of CachingDatastoreService or CachingAsyncDatastoreService to create an interface tailored exactly to your caching needs.
- Author:
- Jeff Schnitzer
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.appengine.api.datastore.AsyncDatastoreService
Get a caching AsyncDatastoreService with no pre-set expiration on cache values.static com.google.appengine.api.datastore.AsyncDatastoreService
getAsyncDatastoreService(int expirySeconds)
Get a caching AsyncDatastoreService with a specific expiration on all cached items.static com.google.appengine.api.datastore.AsyncDatastoreService
getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg)
Get a caching AsyncDatastoreService with no pre-set expiration on cache values.static com.google.appengine.api.datastore.AsyncDatastoreService
getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, int expirySeconds)
Get a caching AsyncDatastoreService with a specific expiration on all cached items.static CachingAsyncDatastoreService
getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, EntityMemcache em)
Get a caching AsyncDatastoreService that uses a particular EntityMemcache configuration.static CachingAsyncDatastoreService
Get a caching AsyncDatastoreService that uses a particular EntityMemcache configuration.static com.google.appengine.api.datastore.DatastoreService
Get a caching DatastoreService with no pre-set expiration on cache values.static com.google.appengine.api.datastore.DatastoreService
getDatastoreService(int expirySeconds)
Get a caching DatastoreService with a specific expiration on all cached items.static com.google.appengine.api.datastore.DatastoreService
getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg)
Get a caching DatastoreService with no pre-set expiration on cache values.static com.google.appengine.api.datastore.DatastoreService
getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, int expirySeconds)
Get a caching DatastoreService with a specific expiration on all cached items.static CachingDatastoreService
getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, EntityMemcache em)
Get a caching DatastoreService that uses a particular EntityMemcache configuration.static CachingDatastoreService
Get a caching DatastoreService that uses a particular EntityMemcache configuration.static String
The memcache snamespace used by default for most of these factory methodsstatic void
setDefaultMemcacheNamespace(String value)
The default namespace is the one used by Objectify for its cache.
-
Method Details
-
setDefaultMemcacheNamespace
The default namespace is the one used by Objectify for its cache. You can reset it. -
getDefaultMemcacheNamespace
The memcache snamespace used by default for most of these factory methods -
getDatastoreService
public static com.google.appengine.api.datastore.DatastoreService getDatastoreService()Get a caching DatastoreService with no pre-set expiration on cache values. -
getDatastoreService
public static com.google.appengine.api.datastore.DatastoreService getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg)Get a caching DatastoreService with no pre-set expiration on cache values. -
getAsyncDatastoreService
public static com.google.appengine.api.datastore.AsyncDatastoreService getAsyncDatastoreService()Get a caching AsyncDatastoreService with no pre-set expiration on cache values. -
getAsyncDatastoreService
public static com.google.appengine.api.datastore.AsyncDatastoreService getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg)Get a caching AsyncDatastoreService with no pre-set expiration on cache values. -
getDatastoreService
public static com.google.appengine.api.datastore.DatastoreService getDatastoreService(int expirySeconds)Get a caching DatastoreService with a specific expiration on all cached items. -
getDatastoreService
public static com.google.appengine.api.datastore.DatastoreService getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, int expirySeconds)Get a caching DatastoreService with a specific expiration on all cached items. -
getAsyncDatastoreService
public static com.google.appengine.api.datastore.AsyncDatastoreService getAsyncDatastoreService(int expirySeconds)Get a caching AsyncDatastoreService with a specific expiration on all cached items. -
getAsyncDatastoreService
public static com.google.appengine.api.datastore.AsyncDatastoreService getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, int expirySeconds)Get a caching AsyncDatastoreService with a specific expiration on all cached items. -
getDatastoreService
Get a caching DatastoreService that uses a particular EntityMemcache configuration. Ignores the default memcacheService for this factory; that is set when you construct your EntityMemcache. -
getAsyncDatastoreService
Get a caching AsyncDatastoreService that uses a particular EntityMemcache configuration. Ignores the default memcacheService for this factory; that is set when you construct your EntityMemcache. -
getDatastoreService
public static CachingDatastoreService getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, EntityMemcache em)Get a caching DatastoreService that uses a particular EntityMemcache configuration. Ignores the default memcacheService for this factory; that is set when you construct your EntityMemcache. -
getAsyncDatastoreService
public static CachingAsyncDatastoreService getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, EntityMemcache em)Get a caching AsyncDatastoreService that uses a particular EntityMemcache configuration. Ignores the default memcacheService for this factory; that is set when you construct your EntityMemcache.
-