|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ErrorHandler
Handles errors raised by the MemcacheService
, registered with
MemcacheService.setErrorHandler(ErrorHandler)
.
The default error handler is an instance of LogAndContinueErrorHandler
.
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 MemcacheServiceException
to expose any errors for
application code to resolve.
Method Summary | |
---|---|
void |
handleDeserializationError(InvalidValueException ivx)
Handles deserialization errors. |
void |
handleServiceError(MemcacheServiceException ex)
Handles back-end service errors. |
Method Detail |
---|
void handleDeserializationError(InvalidValueException ivx)
get
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 of LogAndContinueErrorHandler
(the
default).
void handleServiceError(MemcacheServiceException ex)
MemcacheService
methods 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |