com.google.appengine.api.memcache
Interface ConsistentErrorHandler
-
- All Superinterfaces:
- ErrorHandler
- All Known Implementing Classes:
- ConsistentLogAndContinueErrorHandler, StrictErrorHandler
public interface ConsistentErrorHandler extends ErrorHandler
A marker interface to indicate that allMemcacheServiceException
exceptions should be handled byErrorHandler.handleServiceError(MemcacheServiceException)
. This interface was added to enable handlingMemcacheServiceException
thrown by the variousMemcacheService.put(Object, Object)
methods while preserving backward compatibility withErrorHandler
which did not handle such cases.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
handleDeserializationError(InvalidValueException ivx)
Handles deserialization errors.void
handleServiceError(MemcacheServiceException ex)
Handles back-end service errors.
-
-
-
Method Detail
-
handleDeserializationError
void handleDeserializationError(InvalidValueException ivx)
Description copied from interface:ErrorHandler
Handles deserialization errors. This method is called from either of theget
methods, 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 ofLogAndContinueErrorHandler
(the default).- Specified by:
handleDeserializationError
in interfaceErrorHandler
-
handleServiceError
void handleServiceError(MemcacheServiceException ex)
Description copied from interface:ErrorHandler
Handles back-end service errors. This method is called from most of theMemcacheService
methods in the event of a service error. This is also called forMemcacheService.put(Object, Object)
when the combined key and value size is too large.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.- Specified by:
handleServiceError
in interfaceErrorHandler
- Parameters:
ex
- the service error exception
-
-