private static void checkCallerDisconnect(HRegion region, String task) throws CallerDisconnectedException{ RpcCallContext currentCall = RpcServer.getCurrentCall(); if(currentCall!=null){ long afterTime = currentCall.disconnectSince(); if(afterTime>0){ throw new CallerDisconnectedException( "Aborting on region " + region.getRegionInfo().getRegionNameAsString() + ", call " + task + " after " + afterTime + " ms, since " + "caller disconnected"); } } }