MemcacheServiceFactory (Google App Engine API for Java)

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 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 many MemcacheService 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 the MemcacheService will use the current namespace provided by NamespaceManager.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 returns MemcacheService similar to the one returned by getMemcacheService() but it will use specified namespace for all operations.
        Parameters:
        namespace - 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 NamespaceManager.get().
        Returns:
        a new MemcacheService instance.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

App Engine standard environment for Java