Method returns non-null value if the MemcacheService overrides the
default namespace in API calls. Default namespace is the one returned
by com.google.appengine.api.NamespaceManager#get().
Registers a new ErrorHandler. The handler is called
for errors which are not the application's fault, like a network timeout.
The handler can choose to propagate the error or suppress it.
Errors which are caused by an incorrect use of the API will not be
directed to the handler but rather will be thrown directly.
The default error handler is an instance of
LogAndContinueErrorHandler. In most cases, this will log
exceptions without throwing, which looks like a cache-miss behavior to
the caller. A less permissive alternative is StrictErrorHandler,
which will throw a MemcacheServiceException to surface errors
to callers.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eBaseMemcacheService\u003c/code\u003e interface defines common methods for \u003ccode\u003eMemcacheService\u003c/code\u003e and \u003ccode\u003eAsyncMemcacheService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetErrorHandler()\u003c/code\u003e method retrieves the currently active error handler, which manages errors that are not the application's fault.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetNamespace()\u003c/code\u003e method returns the namespace being used for API calls, or \u003ccode\u003enull\u003c/code\u003e if the default namespace is used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetErrorHandler(ErrorHandler handler)\u003c/code\u003e method allows setting a new error handler to manage non-application-fault errors, with options like \u003ccode\u003eLogAndContinueErrorHandler\u003c/code\u003e and \u003ccode\u003eStrictErrorHandler\u003c/code\u003e available.\u003c/p\u003e\n"]]],[],null,["# Interface BaseMemcacheService (2.0.0)\n\n public interface BaseMemcacheService\n\nMethods that are common between [MemcacheService](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.MemcacheService) and\n[AsyncMemcacheService](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.AsyncMemcacheService).\n\nMethods\n-------\n\n### getErrorHandler()\n\n public abstract ErrorHandler getErrorHandler()\n\nFetches the current error handler.\n\nSee [#setErrorHandler(ErrorHandler)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.BaseMemcacheService#com_google_appengine_api_memcache_BaseMemcacheService_setErrorHandler_com_google_appengine_api_memcache_ErrorHandler_).\n\n### getNamespace()\n\n public abstract String getNamespace()\n\nMethod returns non-null value if the MemcacheService overrides the\ndefault namespace in API calls. Default namespace is the one returned\nby [com.google.appengine.api.NamespaceManager#get()](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.NamespaceManager#com_google_appengine_api_NamespaceManager_get__).\n\n### setErrorHandler(ErrorHandler handler)\n\n public abstract void setErrorHandler(ErrorHandler handler)\n\nRegisters a new `ErrorHandler`. The `handler` is called\nfor errors which are not the application's fault, like a network timeout.\nThe handler can choose to propagate the error or suppress it.\nErrors which are caused by an incorrect use of the API will not be\ndirected to the `handler` but rather will be thrown directly.\n\nThe default error handler is an instance of\n[LogAndContinueErrorHandler](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.LogAndContinueErrorHandler). In most cases, this will log\nexceptions without throwing, which looks like a cache-miss behavior to\nthe caller. A less permissive alternative is [StrictErrorHandler](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.StrictErrorHandler),\nwhich will throw a [MemcacheServiceException](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.MemcacheServiceException) to surface errors\nto callers.\n\nTo guarantee that all instances of [MemcacheServiceException](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.MemcacheServiceException)\nare directed to the error handler, use a [ConsistentErrorHandler](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.ConsistentErrorHandler)\nsuch as [ErrorHandlers#getConsistentLogAndContinue(Level)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.ErrorHandlers#com_google_appengine_api_memcache_ErrorHandlers_getConsistentLogAndContinue_java_util_logging_Level_) or\n[ErrorHandlers#getStrict()](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.ErrorHandlers#com_google_appengine_api_memcache_ErrorHandlers_getStrict__)."]]