-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathErrorHandler.java
72 lines (63 loc) · 2.63 KB
/
ErrorHandler.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* Copyright (c) 2008 Greg Whalin
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the BSD license
*
* This library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
*
* You should have received a copy of the BSD License along with this
* library.
*
* This is an interface implemented by classes that want to receive callbacks
* in the event of an error in {@link MemcachedClient}. The implementor can do
* things like flush caches or perform additioonal logging.
*
* @author Dan Zivkovic <zivkovic@apple.com>
*/
package com.ssh.memcached;
public interface ErrorHandler {
/**
* Called for errors thrown during initialization.
*/
public void handleErrorOnInit( final MemcachedClient client ,
final Throwable error );
/**
* Called for errors thrown during {@link MemcachedClient#get(String)} and related methods.
*/
public void handleErrorOnGet( final MemcachedClient client ,
final Throwable error ,
final String cacheKey );
/**
* Called for errors thrown during {@link MemcachedClient#getMulti(String)} and related methods.
*/
public void handleErrorOnGet( final MemcachedClient client ,
final Throwable error ,
final String[] cacheKeys );
/**
* Called for errors thrown during {@link MemcachedClient#set(String,Object)} and related methods.
*/
public void handleErrorOnSet( final MemcachedClient client ,
final Throwable error ,
final String cacheKey );
/**
* Called for errors thrown during {@link MemcachedClient#delete(String)} and related methods.
*/
public void handleErrorOnDelete( final MemcachedClient client ,
final Throwable error ,
final String cacheKey );
/**
* Called for errors thrown during {@link MemcachedClient#flushAll()} and related methods.
*/
public void handleErrorOnFlush( final MemcachedClient client ,
final Throwable error );
/**
* Called for errors thrown during {@link MemcachedClient#stats()} and related methods.
*/
public void handleErrorOnStats( final MemcachedClient client ,
final Throwable error );
} // interface