Highlights

Before you go delving into the API, you'll probably want to stop and check out which classes you want to take a look at.

ThreadedTransfer

Threaded Transfer is an IO Scheduler which attempts to schedule IO events to occur concurrently, making it potentially very fast. This includes mirroring and duplication.

At worst, Threaded Transfer will operate at the same speed as a linear algorithm, using slightly more processor overhead. At best however, it can perform copy operations in nearly half the time of a traditional algorithm. The determination between best and worst case can be made by a couple of observations.

Common, Half-Duplex devices

Obviously, in order for the IO Scheduler to successfully schedule IO operations concurrently, the underlying devices must support concurrent operation. This means that copying data from a harddrive to itself will have negligable benefit, if any. Likewise, copying from two IDE devices may be forced to operate sequentially if those devices are on a the same IDE channel. However, network connections are commonly capable of reading and writing on the same Socket concurrently.

Significant difference in speed between source and target.

If one stream operates in a negligable amount of time in comparison to it's counterpart, concurrent operation will have little effect, as the faster stream is always waiting for buffer room.

Write Caching

Some operating systems and hard drives will cache write operations, allowing the write method to return immediately and switch back to a read method, while the OS or drive waits for an opportune time to commit the data from the cache to it's intended destination. In this respect, the system is automatically attempting to concurrently schedule events. However, the equivilent performance of this strategy in comparison to ThreadedTransfer is dependant on implementation (when does the system actually perform the write).

ThreadedTransfer offers a benefit over manually implementing this strategy however. A ThreadedTransfer maintains all data to be written in a single buffer, instead of potentially duplicating it into a sequence of buffers when performing a mirroring operation, and attempts load data directly into the same buffer which will later be used to re-store it.

In general however, ThreadedTransfer provides an ideal mechanism to transfer data from a source to a target, since, regardless of the implementation, it will make a best attempt to schedule IO concurrently.

WindowHandler

WindowHandler is an extremely convienent and easy to use utility to manage windows when designing a GUI in java. It reduces the need to write redundant WindowListeners to manage WindowEvents, and transparently allows code to avoid needing to determine when to call System.exit(0).

Further, it provides detailed methods for window centering, which may be used to address issues in initial window placement.

Queuing

The Queuing package provides a set of classes similiar to Java's own Collections API, but with two enhancements:

  1. Optimization for Queue operations
  2. Compatability with VMs as early as 1.1

Generally speaking, Queues are ideal for quickly collecting a group of elements for processing. The behavior is desirable over using one of Java's Collections when the group will only be iterated over a single time, as the Queue will no longer hold a reference to each element as it is processed, making it eligable for garbage collection immediately, and not just when the entire Collection is discarded.

Queues are also ideal iterating over a set of elements, where that set will change during the process of iteration. That is, elements can be safely (and efficiently) removed with interveining additions being made without "breaking" an Iterator moving over the Collection


While this is a very brief list of the utilities provided in the API, these are perhaps some that the general public (programmers) will find immediately usefull.

Forged on SourceForge.net Valid XHTML 1.0!