org.csc.phynixx.tutorial
Class TAEnabledUTFWriterImpl

java.lang.Object
  extended by org.csc.phynixx.tutorial.TAEnabledUTFWriterImpl
All Implemented Interfaces:
IAutoCommitAware, IPhynixxConnection, IXADataRecorderAware, TAEnabledUTFWriter

public class TAEnabledUTFWriterImpl
extends Object
implements TAEnabledUTFWriter

Basisklasse zur Verwaltung von Filezugriffen.

A RandomAccessFile provides random access to the file's content.


Constructor Summary
TAEnabledUTFWriterImpl(String connectionId, UTFWriter writer)
           
 
Method Summary
 void close()
          Schliesst die Datei und den FileChannel
 void commit()
           
 String getConnectionId()
           
 IXADataRecorder getXADataRecorder()
           
 boolean isAutoCommit()
           
 boolean isClosed()
          zeigt an, ob die Instanz geschlossen ist
 void prepare()
          definiert den gueltigen Zustand nach commit
 List<String> readContent()
          reads the content
 IDataRecordReplay recoverReplayListener()
           
 void reset()
          bereitet die Writer zur Wiederverwendung vor
 void resetContent()
          resets the content of the file associated with die current transaction
 void rollback()
           
 void setAutoCommit(boolean autoCommit)
           
 void setXADataRecorder(IXADataRecorder xaDataRecorder)
           
 String toString()
           
 TAEnabledUTFWriter write(String value)
          writes a string to file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TAEnabledUTFWriterImpl

public TAEnabledUTFWriterImpl(String connectionId,
                              UTFWriter writer)
                       throws Exception
Throws:
Exception
Method Detail

getConnectionId

public String getConnectionId()
Specified by:
getConnectionId in interface TAEnabledUTFWriter

isAutoCommit

public boolean isAutoCommit()
Specified by:
isAutoCommit in interface IAutoCommitAware

setAutoCommit

public void setAutoCommit(boolean autoCommit)
Specified by:
setAutoCommit in interface IAutoCommitAware

close

public void close()
Schliesst die Datei und den FileChannel

Specified by:
close in interface IPhynixxConnection

isClosed

public boolean isClosed()
zeigt an, ob die Instanz geschlossen ist

Returns:
true wenn die Datei geschlossen ist

resetContent

@RequiresTransaction
public void resetContent()
                  throws IOException
Description copied from interface: TAEnabledUTFWriter
resets the content of the file associated with die current transaction

Specified by:
resetContent in interface TAEnabledUTFWriter
Throws:
IOException

write

@RequiresTransaction
public TAEnabledUTFWriter write(String value)
                         throws IOException
Description copied from interface: TAEnabledUTFWriter
writes a string to file

Specified by:
write in interface TAEnabledUTFWriter
Returns:
Throws:
IOException

readContent

public List<String> readContent()
                         throws IOException
Description copied from interface: TAEnabledUTFWriter
reads the content

Specified by:
readContent in interface TAEnabledUTFWriter
Returns:
Throws:
IOException

reset

public void reset()
bereitet die Writer zur Wiederverwendung vor

Specified by:
reset in interface IPhynixxConnection

commit

public void commit()
Specified by:
commit in interface IPhynixxConnection

rollback

public void rollback()
Specified by:
rollback in interface IPhynixxConnection

prepare

public void prepare()
definiert den gueltigen Zustand nach commit

Specified by:
prepare in interface IPhynixxConnection

toString

public String toString()
Overrides:
toString in class Object

setXADataRecorder

public void setXADataRecorder(IXADataRecorder xaDataRecorder)
Specified by:
setXADataRecorder in interface IXADataRecorderAware
Parameters:
xaDataRecorder -

getXADataRecorder

public IXADataRecorder getXADataRecorder()
Specified by:
getXADataRecorder in interface IXADataRecorderAware

recoverReplayListener

public IDataRecordReplay recoverReplayListener()
Specified by:
recoverReplayListener in interface IXADataRecorderAware


Copyright © 2015. All rights reserved.