@@ -18,7 +18,7 @@ public synchronized static void put(final String key, Object data, int expire) {
18
18
ThrottlingPool .remove (key );
19
19
if (data != null ) {
20
20
if (expire >= 0 ) {
21
- Future future = executor .schedule (new Runnable () {
21
+ Future <?> future = executor .schedule (new Runnable () {
22
22
@ Override
23
23
public void run () {
24
24
synchronized (ThrottlingPool .class ) {
@@ -50,7 +50,7 @@ public synchronized static int getExpire(String key) {
50
50
public synchronized static Object remove (String key ) {
51
51
Entity entity = map .remove (key );
52
52
if (entity == null ) return null ;
53
- Future future = entity .getFuture ();
53
+ Future <?> future = entity .getFuture ();
54
54
if (future != null ) future .cancel (true );
55
55
return entity .getValue ();
56
56
}
@@ -62,7 +62,7 @@ public synchronized static int size() {
62
62
public synchronized static void clear () {
63
63
for (Entity entity : map .values ()) {
64
64
if (entity != null ) {
65
- Future future = entity .getFuture ();
65
+ Future <?> future = entity .getFuture ();
66
66
if (future != null ) future .cancel (true );
67
67
}
68
68
}
@@ -76,9 +76,9 @@ public synchronized static Map<String, Entity> getPool() {
76
76
private static class Entity {
77
77
private Object value ;
78
78
private int expire ;
79
- private Future future ;
79
+ private Future <?> future ;
80
80
81
- public Entity (Object value , int expire , Future future ) {
81
+ public Entity (Object value , int expire , Future <?> future ) {
82
82
this .value = value ;
83
83
this .expire = expire ;
84
84
this .future = future ;
@@ -92,7 +92,7 @@ public int getExpire() {
92
92
return expire ;
93
93
}
94
94
95
- public Future getFuture () {
95
+ public Future <?> getFuture () {
96
96
return future ;
97
97
}
98
98
}
0 commit comments