@Deprecated public interface ErrorHandler
MemcacheService, registered with
BaseMemcacheService.setErrorHandler(ErrorHandler). The default error handler is an instance of
LogAndContinueErrorHandler. In most cases this will log the underlying error condition, but emulate cache-miss behavior in response rather than surfacing the problem to calling code. A less permissive alternative is
StrictErrorHandler, which will instead throw a
MemcacheServiceExceptionto expose any errors for application code to resolve. To guarantee that all
MemcacheServiceExceptionare directed to the error handler use
|Modifier and Type||Method and Description|
Handles deserialization errors.
Handles back-end service errors.
void handleDeserializationError(InvalidValueException ivx)
getmethods, if the retrieved value cannot be deserialized. This normally indicates an application upgrade since the cache entry was stored, and should thus be treated as a cache miss, which is the behavior of
void handleServiceError(MemcacheServiceException ex)
MemcacheServicemethods in the event of a service error. The handler may throw any
RuntimeException, or it may simply return for "permissive" error handling, which will generally emulate behavior of a cache miss due to a discarded entry.
ex- the service error exception