[JDK8] Erasure of PoolMap#remove(K,V) conflicts with superclass method
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1545800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b849239162
commit
60c3ce0081
|
@ -260,7 +260,7 @@ public class HTablePool implements Closeable {
|
||||||
String tableName = Bytes.toString(table.getTableName());
|
String tableName = Bytes.toString(table.getTableName());
|
||||||
if (tables.size(tableName) >= maxSize) {
|
if (tables.size(tableName) >= maxSize) {
|
||||||
// release table instance since we're not reusing it
|
// release table instance since we're not reusing it
|
||||||
this.tables.remove(tableName, table);
|
this.tables.removeValue(tableName, table);
|
||||||
this.tableFactory.releaseHTableInterface(table);
|
this.tableFactory.releaseHTableInterface(table);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -967,7 +967,7 @@ public class RpcClient {
|
||||||
// release the resources
|
// release the resources
|
||||||
// first thing to do;take the connection out of the connection list
|
// first thing to do;take the connection out of the connection list
|
||||||
synchronized (connections) {
|
synchronized (connections) {
|
||||||
connections.remove(remoteId, this);
|
connections.removeValue(remoteId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// close the streams and therefore the socket
|
// close the streams and therefore the socket
|
||||||
|
|
|
@ -88,12 +88,20 @@ public class PoolMap<K, V> implements Map<K, V> {
|
||||||
public V remove(Object key) {
|
public V remove(Object key) {
|
||||||
Pool<V> pool = pools.remove(key);
|
Pool<V> pool = pools.remove(key);
|
||||||
if (pool != null) {
|
if (pool != null) {
|
||||||
remove((K) key, pool.get());
|
removeValue((K) key, pool.get());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Will be removed for Java 8, use {@link #removeValue} instead
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public boolean remove(K key, V value) {
|
public boolean remove(K key, V value) {
|
||||||
|
return removeValue(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean removeValue(K key, V value) {
|
||||||
Pool<V> pool = pools.get(key);
|
Pool<V> pool = pools.get(key);
|
||||||
boolean res = false;
|
boolean res = false;
|
||||||
if (pool != null) {
|
if (pool != null) {
|
||||||
|
|
Loading…
Reference in New Issue