Class LocalMemcacheService

java.lang.Object
com.google.appengine.tools.development.AbstractLocalRpcService
com.google.appengine.api.memcache.dev.LocalMemcacheService
All Implemented Interfaces:
LocalRpcService

@AutoService(LocalRpcService.class) public final class LocalMemcacheService extends AbstractLocalRpcService
Java bindings for the local Memcache service. The local cache will by default hold up to 100Mb of combined key-and-value size. That limit can be changed with the init property memcache.maxsize, set in megabytes ("100M"), in kilobytes ("102400K"), or in bytes ("104857600").
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.appengine.tools.development.LocalRpcService

    LocalRpcService.Status
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The package name for this service.
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheBatchIncrementResponse
    batchIncrement(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheBatchIncrementRequest batchReq)
     
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheDeleteResponse
    delete(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheDeleteRequest req)
     
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheFlushResponse
    flushAll(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheFlushRequest req)
     
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheGetResponse
    get(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheGetRequest req)
     
    Returns the maximum size of an encoded API request in bytes, or null for the default size.
    long
     
    Returns the package for the service, for example, "datastore_v3".
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheIncrementResponse
    increment(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheIncrementRequest req)
     
    void
    init(LocalServiceContext context, Map<String,String> properties)
    Initializes the service with a set of configuration properties.
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheSetResponse
    set(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheSetRequest req)
     
    void
    setLimits(int bytes)
    Skips the system properties to set the limit values for size and element counts.
    void
    Puts a new service into "serving" mode.
    com.google.appengine.api.memcache.MemcacheServicePb.MemcacheStatsResponse
    stats(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheStatsRequest req)
     
    void
    Stops the service, releasing all of its resources.

    Methods inherited from class com.google.appengine.tools.development.AbstractLocalRpcService

    getDefaultDeadline, getMaximumDeadline

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LocalMemcacheService

      public LocalMemcacheService()
  • Method Details

    • getPackage

      public String getPackage()
      Description copied from interface: LocalRpcService
      Returns the package for the service, for example, "datastore_v3".
      Returns:
      a not null package name.
    • init

      public void init(LocalServiceContext context, Map<String,String> properties)
      Description copied from interface: LocalRpcService
      Initializes the service with a set of configuration properties. Must be called before a service is started.
      Specified by:
      init in interface LocalRpcService
      Overrides:
      init in class AbstractLocalRpcService
      Parameters:
      context - A context object for the application
      properties - A read-only Map of properties.
    • setLimits

      public void setLimits(int bytes)
      Skips the system properties to set the limit values for size and element counts.
      Parameters:
      bytes - number of bytes of keys + values that is allowed before old entries are discarded.
    • start

      public void start()
      Description copied from interface: LocalRpcService
      Puts a new service into "serving" mode. Aside from setting properties, the service is not functional until after having been started.
      Specified by:
      start in interface LocalRpcService
      Overrides:
      start in class AbstractLocalRpcService
    • stop

      public void stop()
      Description copied from interface: LocalRpcService
      Stops the service, releasing all of its resources.
      Specified by:
      stop in interface LocalRpcService
      Overrides:
      stop in class AbstractLocalRpcService
    • get

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheGetResponse get(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheGetRequest req)
    • set

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheSetResponse set(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheSetRequest req)
    • delete

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheDeleteResponse delete(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheDeleteRequest req)
    • increment

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheIncrementResponse increment(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheIncrementRequest req)
    • batchIncrement

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheBatchIncrementResponse batchIncrement(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheBatchIncrementRequest batchReq)
    • flushAll

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheFlushResponse flushAll(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheFlushRequest req)
    • stats

      public com.google.appengine.api.memcache.MemcacheServicePb.MemcacheStatsResponse stats(LocalRpcService.Status status, com.google.appengine.api.memcache.MemcacheServicePb.MemcacheStatsRequest req)
    • getMaxSizeInBytes

      public long getMaxSizeInBytes()
    • getMaxApiRequestSize

      public Integer getMaxApiRequestSize()
      Description copied from interface: LocalRpcService
      Returns the maximum size of an encoded API request in bytes, or null for the default size.
      Specified by:
      getMaxApiRequestSize in interface LocalRpcService
      Overrides:
      getMaxApiRequestSize in class AbstractLocalRpcService