|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.ipc.Server
An abstract 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.
Client
Field Summary | |
static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
protected |
Server(int port,
Class paramClass,
int handlerCount,
Configuration conf)
Constructs a server listening on the named port. |
Method Summary | |
abstract Writable |
call(Writable param)
Called for each call. |
static Server |
get()
Returns the server instance called under or null. |
void |
join()
Wait for the server to be stopped. |
void |
setTimeout(int timeout)
Sets the timeout used for network i/o. |
void |
start()
Starts the service. |
void |
stop()
Stops the service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
protected Server(int port, Class paramClass, int handlerCount, Configuration conf)
handlerCount determines
the number of handler threads that will be used to process calls.
Method Detail |
public static Server get()
call(Writable)
implementations, and under Writable
methods of paramters and return values. Permits applications to access
the server context.
public void setTimeout(int timeout)
public void start() throws IOException
IOException
public void stop()
public void join() throws InterruptedException
stop()
.
InterruptedException
public abstract Writable call(Writable param) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |