Thread safe pool of
FileChannel objects.
Opening and closing file is an expensive operation and under certain
circumstances this can singificantly harm performances, because on every
close the filesystem cache might be flushed.
To minimize the negative impact opened files can be pooled, which is a
responsibility of
FileChannelPool class.
FileChannelPool allows to specify maximum number of opened
FileChannel s.
Note that under certain circumtances (when there are no empty slots in pool)
the initial capacity can be exceeded (more files are opened then the
specified capacity is). |