Thread Pooling in Java 5
Thread Pooling in Java 5 is configured using one of the implementations of
the executor interface.
One implementation is ThreadPoolExecutor. This implementation, as the name,
suggests is configurable with the no of threads in the pool, the maximum pool
size, a rejection handler, a thread factory, a work queue.
Executor <---------- ExecutorService <-------- AbstractExecutorService
<----------- ThreadPoolExecutor <---------- ScheduledThreadPoolExecutor (This
is the depiction of the hierarchy => Executor is extended by the
ExecutorService interface which is realized by the AbstractExecutorService
class and so on)
The significance of these configurable parameters is listed below barring the
self explanatory parameters:
Rejection Handler / Saturation Policies: This is an implementation that
determines the policy to be used in cases when a task is to... (more)
TCP and resolving the Address Already in Use Issue.
We have come long and far since the introduction of TCP (RFC 791, 793). It
has become the ubiquitous protocol governing communication amongst various
applications (including and not limited to Email-SMTP, File Transfer - FTP,
HTTP etc.). It is so prevalent and also so visible that an application
developer hidden from the complexities of TCP programming is befuddled by the
obtuse errors that are generated if and when they are. The following
paragraphs will attempt to shine light on one such common message: "Address
Already in Use... (more)
There are a myriad of reason why one is successful or unsuccessful in an
interview. This article will not cover the art of impressing the interviewer
or provide sample technical questions (data structures, java, logical) but
instead elucidate the reasoning in signing on to the dotted line. If you are
interested in sample technical questions and answers, there are a lot of
texts - books, articles, blogs - that are available. In fact, there is a
compilation of sample questions along with some answers on my blog (see the
"See Also" section below).
The interviewee (he is one who is ... (more)