Interface ConsistentErrorHandler
- All Superinterfaces:
ErrorHandler
- All Known Implementing Classes:
ConsistentLogAndContinueErrorHandler,StrictErrorHandler
A marker interface to indicate that all
MemcacheServiceException exceptions should be
handled by ErrorHandler.handleServiceError(MemcacheServiceException). This interface was
added to enable handling MemcacheServiceException thrown by the various MemcacheService.put(Object, Object) methods while preserving backward compatibility with ErrorHandler which did not handle such cases.-
Method Summary
Modifier and TypeMethodDescriptionvoidHandles deserialization errors.voidHandles back-end service errors.
-
Method Details
-
handleDeserializationError
Description copied from interface:ErrorHandlerHandles deserialization errors. This method is called from either of thegetmethods, 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:
handleDeserializationErrorin interfaceErrorHandler
-
handleServiceError
Description copied from interface:ErrorHandlerHandles back-end service errors. This method is called from most of theMemcacheServicemethods 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:
handleServiceErrorin interfaceErrorHandler- Parameters:
ex- the service error exception
-