Framework Professional Edition Package


org.mbs.services.transaction.file
Class FileTransactionPlain

java.lang.Object
  extended by org.mbs.services.transaction.file.FileTransactionPlain
All Implemented Interfaces:
FileTransaction

public class FileTransactionPlain
extends java.lang.Object
implements FileTransaction

This is implementation of FileTransaction proxy in plain java. Please notice, that this class is not thread-safe.

Author:
Valentin Valchev

Constructor Summary
FileTransactionPlain()
           
 
Method Summary
 void commit()
          Commits the changes.
 void init(TransactionContext transaction)
          This method is called by the FileTransactionResource class, right after, the implementing class is instantiated.
 void mark(int operation, java.io.File file)
          Marks a file, that operation is being performed on it.
 void rollback()
          Rolls back the changes, restoring the old contents and removed files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTransactionPlain

public FileTransactionPlain()
Method Detail

mark

public void mark(int operation,
                 java.io.File file)
          throws java.io.IOException
Marks a file, that operation is being performed on it.

Specified by:
mark in interface FileTransaction
Parameters:
operation - the operation that will be performed on the file.
file - the file itself.
Throws:
java.io.IOException - on I/O error
See Also:
FileTransactionResource.FILE_CREATE, FileTransactionResource.FILE_CREATE_TEMP, FileTransactionResource.FILE_MODIFY, FileTransactionResource.FILE_REMOVE

commit

public final void commit()
Description copied from interface: FileTransaction
Commits the changes. Also cleans up the garbage and operation log.

Specified by:
commit in interface FileTransaction

rollback

public final void rollback()
Description copied from interface: FileTransaction
Rolls back the changes, restoring the old contents and removed files.

Specified by:
rollback in interface FileTransaction

init

public void init(TransactionContext transaction)
Description copied from interface: FileTransaction
This method is called by the FileTransactionResource class, right after, the implementing class is instantiated.

Specified by:
init in interface FileTransaction
Parameters:
transaction - the current transaction context.
See Also:
FileTransaction.init(org.mbs.services.transaction.TransactionContext)

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved