Save This Page
Home » hadoop-0.14.4 » org.apache » hadoop » ipc » [javadoc | source]
org.apache.hadoop.ipc
public class: Client [javadoc | source]
java.lang.Object
   org.apache.hadoop.ipc.Client
A client for an IPC service. IPC calls take a single Writable as a parameter, and return a Writable as their value. A service runs on a port and is defined by a parameter class and a value class.
Field Summary
public static final  Log LOG     
Constructor:
 public Client(Class valueClass,
    Configuration conf) 
    Construct an IPC client whose values are of the given Writable class.
Method from org.apache.hadoop.ipc.Client Summary:
call,   call,   setTimeout,   stop
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.hadoop.ipc.Client Detail:
 public Writable call(Writable param,
    InetSocketAddress address) throws IOException, InterruptedException 
    Make a call, passing param, to the IPC server running at address, returning the value. Throws exceptions if there are network problems or if the remote code threw an exception.
 public Writable[] call(Writable[] params,
    InetSocketAddress[] addresses) throws IOException 
    Makes a set of calls in parallel. Each parameter is sent to the corresponding address. When all values are available, or have timed out or errored, the collected results are returned in an array. The array contains nulls for calls that timed out or errored.
 public  void setTimeout(int timeout) 
    Sets the timeout used for network i/o.
 public  void stop() 
    Stop all threads related to this client. No further calls may be made using this client.