Mercurial > hg > blitz_stable
diff src/org/dancres/blitz/entry/WriteEscort.java @ 0:3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 21 Mar 2009 11:00:06 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/dancres/blitz/entry/WriteEscort.java Sat Mar 21 11:00:06 2009 +0000 @@ -0,0 +1,20 @@ +package org.dancres.blitz.entry; + +import net.jini.core.transaction.TransactionException; + +/** + Whenever a write is performed, it needs protection until commit time. + This is achieved by escorting the written Entry through the write process + with an instance of this type. The Escort is responsible for setting + appropriate TxnLocks etc. to achieve the required protection. + */ +public interface WriteEscort { + /** + Called before the Entry which is being written actually becomes + available in the filesystem. At this point, an ID has been allocated + etc. but the Entry is not visible outside of this thread. + + @return <code>true</code> if the write should proceed, false otherwise + */ + public boolean writing(OpInfo anOp); +}