HBASE-5535 Make the functions in task monitor synchronized

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1299088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-03-09 22:47:54 +00:00
parent 7d34da889e
commit e4c43d72bf
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ public class TaskMonitor {
return instance;
}
public MonitoredTask createStatus(String description) {
public synchronized MonitoredTask createStatus(String description) {
MonitoredTask stat = new MonitoredTaskImpl();
stat.setDescription(description);
MonitoredTask proxy = (MonitoredTask) Proxy.newProxyInstance(
@ -80,7 +80,7 @@ public class TaskMonitor {
return proxy;
}
public MonitoredRPCHandler createRPCStatus(String description) {
public synchronized MonitoredRPCHandler createRPCStatus(String description) {
MonitoredRPCHandler stat = new MonitoredRPCHandlerImpl();
stat.setDescription(description);
MonitoredRPCHandler proxy = (MonitoredRPCHandler) Proxy.newProxyInstance(