neo4j/neo4j — pull request #2132 by chrisvest (2014-03-18 14:22:07+00:00)
Title: Introduce the StoreChannel abstraction, and the AdversarialFSA.

The StoreChannel interface is very similar to the API of the FileChannel class.
I had to introduce it because of the many final methods of the FileChannel.
The AdversarialFileSystemAbstraction needed to be able to throw exceptions from those methods
that were marked as final in the FileChannel, so I had to abstract away the FileChannel itself, and
introduce this new indirection. The StoreFileChannel wraps a FileChannel while exposing the
StoreChannel API.

The AdversarialFileSystemAbstraction is a file system that can be configured to throw exceptions and
failures as we please. This is useful for testing partial failure scenarios that our current robustness
suite does not cover, since it currently only works by killing entire processes - not individual
transactions.