org.apache.commons.transaction.file
Class TxFileResourceManager.FileTxContext

java.lang.Object
  extended by org.apache.commons.transaction.AbstractTransactionalResourceManager.AbstractTxContext
      extended by org.apache.commons.transaction.file.TxFileResourceManager.FileTxContext
All Implemented Interfaces:
ResourceManager<StreamableResource>
Enclosing class:
TxFileResourceManager

public class TxFileResourceManager.FileTxContext
extends AbstractTransactionalResourceManager.AbstractTxContext
implements ResourceManager<StreamableResource>


Nested Class Summary
protected  class TxFileResourceManager.FileTxContext.TxFileResource
           
 
Constructor Summary
TxFileResourceManager.FileTxContext()
           
 
Method Summary
protected  void closeAllStreams()
           
 void commit()
           
 void dispose()
           
 TxFileResourceManager.FileTxContext.TxFileResource getResource(String path)
          Gets the resource denoted by the path
 String getRootPath()
          Gets the root path of this manager.
protected  void registerStream(Closeable stream)
           
 void rollback()
           
 void start(long timeout, TimeUnit unit)
           
 
Methods inherited from class org.apache.commons.transaction.AbstractTransactionalResourceManager.AbstractTxContext
isMarkedForRollback, isReadOnly, join, markForRollback, prepare, readLock, setReadOnly, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TxFileResourceManager.FileTxContext

public TxFileResourceManager.FileTxContext()
Method Detail

registerStream

protected void registerStream(Closeable stream)

closeAllStreams

protected void closeAllStreams()

getResource

public TxFileResourceManager.FileTxContext.TxFileResource getResource(String path)
                                                               throws ResourceException
Description copied from interface: ResourceManager
Gets the resource denoted by the path

Specified by:
getResource in interface ResourceManager<StreamableResource>
Parameters:
path - the path of the resource
Returns:
the resource denoted by the path
Throws:
ResourceException - in case anything goes fatally wrong

start

public void start(long timeout,
                  TimeUnit unit)
Overrides:
start in class AbstractTransactionalResourceManager.AbstractTxContext

getRootPath

public String getRootPath()
Description copied from interface: ResourceManager
Gets the root path of this manager.

Specified by:
getRootPath in interface ResourceManager<StreamableResource>
Returns:
the root path or null if no applicable

dispose

public void dispose()
Overrides:
dispose in class AbstractTransactionalResourceManager.AbstractTxContext

commit

public void commit()
Overrides:
commit in class AbstractTransactionalResourceManager.AbstractTxContext

rollback

public void rollback()
Overrides:
rollback in class AbstractTransactionalResourceManager.AbstractTxContext


Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.