com.googlecode.objectify.cache
Class CachingDatastoreServiceFactory

java.lang.Object
  extended by com.googlecode.objectify.cache.CachingDatastoreServiceFactory

public class CachingDatastoreServiceFactory
extends java.lang.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

Constructor Summary
CachingDatastoreServiceFactory()
           
 
Method Summary
static com.google.appengine.api.datastore.AsyncDatastoreService getAsyncDatastoreService()
          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)
          Get a caching AsyncDatastoreService with no pre-set expiration on cache values.
static CachingAsyncDatastoreService getAsyncDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, EntityMemcache em)
          Get a caching AsyncDatastoreService that uses a particular EntityMemcache configuration.
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(EntityMemcache em)
          Get a caching AsyncDatastoreService that uses a particular EntityMemcache configuration.
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.DatastoreService getDatastoreService()
          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)
          Get a caching DatastoreService with no pre-set expiration on cache values.
static CachingDatastoreService getDatastoreService(com.google.appengine.api.datastore.DatastoreServiceConfig cfg, EntityMemcache em)
          Get a caching DatastoreService that uses a particular EntityMemcache configuration.
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(EntityMemcache em)
          Get a caching DatastoreService that uses a particular EntityMemcache configuration.
static com.google.appengine.api.datastore.DatastoreService getDatastoreService(int expirySeconds)
          Get a caching DatastoreService with a specific expiration on all cached items.
static java.lang.String getDefaultMemcacheNamespace()
          The memcache snamespace used by default for most of these factory methods
static void setDefaultMemcacheNamespace(java.lang.String value)
          The default namespace is the one used by Objectify for its cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingDatastoreServiceFactory

public CachingDatastoreServiceFactory()
Method Detail

setDefaultMemcacheNamespace

public static void setDefaultMemcacheNamespace(java.lang.String value)
The default namespace is the one used by Objectify for its cache. You can reset it.


getDefaultMemcacheNamespace

public static java.lang.String 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

public static CachingDatastoreService getDatastoreService(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(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.


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.



Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1