com.google.appengine.api.memcache
Class MemcacheServiceFactory
- java.lang.Object
-
- com.google.appengine.api.memcache.MemcacheServiceFactory
-
public class MemcacheServiceFactory extends java.lang.Object
The factory by which users acquire a handle to the MemcacheService.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static AsyncMemcacheService
getAsyncMemcacheService()
Similar togetMemcacheService()
but returns a handle to an asynchronous version of the cache service.static AsyncMemcacheService
getAsyncMemcacheService(java.lang.String namespace)
Similar togetMemcacheService(String)
but returns a handle to an asynchronous version of the cache service.static MemcacheService
getMemcacheService()
Gets a handle to the cache service.static MemcacheService
getMemcacheService(java.lang.String namespace)
Gets a handle to the cache service, forcing use of specific namespace.
-
-
-
Method Detail
-
getMemcacheService
public static MemcacheService getMemcacheService()
Gets a handle to the cache service. Although there is only one actual cache, an application may make as manyMemcacheService
instances as it finds convenient.If using multiple instances, note that the error handler established with
BaseMemcacheService.setErrorHandler(ErrorHandler)
is specific to each instance. All operations in theMemcacheService
will use the current namespace provided byNamespaceManager.get()
.- Returns:
- a new
MemcacheService
instance.
-
getMemcacheService
public static MemcacheService getMemcacheService(java.lang.String namespace)
Gets a handle to the cache service, forcing use of specific namespace. The method returnsMemcacheService
similar to the one returned bygetMemcacheService()
but it will use specifiednamespace
for all operations.- Parameters:
namespace
- if notnull
forces the use ofnamespace
for all operations inMemcacheService
. Ifnamespace
isnull
- createdMemcacheService
will use current namespace provided byNamespaceManager.get()
.- Returns:
- a new
MemcacheService
instance.
-
getAsyncMemcacheService
public static AsyncMemcacheService getAsyncMemcacheService()
Similar togetMemcacheService()
but returns a handle to an asynchronous version of the cache service.
-
getAsyncMemcacheService
public static AsyncMemcacheService getAsyncMemcacheService(java.lang.String namespace)
Similar togetMemcacheService(String)
but returns a handle to an asynchronous version of the cache service.
-
-