Class MemcacheServiceFactory (2.0.0)

public class MemcacheServiceFactory

The factory by which users acquire a handle to the MemcacheService.

Inheritance

java.lang.Object > MemcacheServiceFactory

Static Methods

getAsyncMemcacheService()

public static AsyncMemcacheService getAsyncMemcacheService()

Similar to #getMemcacheService() but returns a handle to an asynchronous version of the cache service.

Returns
Type Description
AsyncMemcacheService

getAsyncMemcacheService(String namespace)

public static AsyncMemcacheService getAsyncMemcacheService(String namespace)

Similar to #getMemcacheService(String) but returns a handle to an asynchronous version of the cache service.

Parameter
Name Description
namespace String
Returns
Type Description
AsyncMemcacheService

getMemcacheService()

public static MemcacheService getMemcacheService()

Gets a handle to the cache service. Although there is only one actual cache, an application may make as many MemcacheService instances as it finds convenient.

If using multiple instances, note that the error handler established with MemcacheService#setErrorHandler(ErrorHandler) is specific to each instance.

All operations in the MemcacheService will use the current namespace provided by com.google.appengine.api.NamespaceManager#get().

Returns
Type Description
MemcacheService

a new MemcacheService instance.

getMemcacheService(String namespace)

public static MemcacheService getMemcacheService(String namespace)

Gets a handle to the cache service, forcing use of specific namespace. The method returns MemcacheService similar to the one returned by MemcacheServiceFactory#getMemcacheService() but it will use specified namespace for all operations.

Parameter
Name Description
namespace String

if not null forces the use of namespace for all operations in MemcacheService . If namespace is null - created MemcacheService will use current namespace provided by com.google.appengine.api.NamespaceManager#get().

Returns
Type Description
MemcacheService

a new MemcacheService instance.