/** * Creates and returns a proxy to the CoprocessorProtocol instance running in the * master. * * @param protocol The class or interface defining the remote protocol * @return A CoprocessorProtocol instance */ public <T extends CoprocessorProtocol> T coprocessorProxy( Class<T> protocol) { return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{protocol}, new MasterExecRPCInvoker(conf, connection, protocol)); }
/** * Creates and returns a proxy to the CoprocessorProtocol instance running in the master. * @param protocol The class or interface defining the remote protocol * @return A CoprocessorProtocol instance */ public <T extends CoprocessorProtocol> T coprocessorProxy(Class<T> protocol) { return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] { protocol }, new MasterExecRPCInvoker(conf, connection, protocol)); }