org.csc.phynixx.loggersystem.logrecord
Class PhynixxXADataRecorder

java.lang.Object
  extended by org.csc.phynixx.loggersystem.logrecord.PhynixxXADataRecorder
All Implemented Interfaces:
IDataRecordSequence, IXADataRecorder

public class PhynixxXADataRecorder
extends Object
implements IXADataRecorder

thisclas is backwards bound to the PhynixxXARecorderRepository. The current class manages LogEntries but not know the persistence logger.


Method Summary
 void addMessage(IDataRecord message)
           
 void close()
          closes the current datalogger and rewinds
 int compareTo(Object obj)
           
 IDataRecord createDataRecord(XALogRecordType logRecordType, byte[] recordData)
           
 IDataRecord createDataRecord(XALogRecordType logRecordType, byte[][] recordData)
           
 void destroy()
          destroyes the current dataLogger
 boolean equals(Object obj)
           
 List<IDataRecord> getDataRecords()
           
 long getMessageSequenceId()
           
 long getXADataRecorderId()
           
 int hashCode()
           
 boolean isClosed()
           
 boolean isCommitting()
           
 boolean isCompleted()
           
 boolean isEmpty()
           
 boolean isPrepared()
           
 void messageSequenceCreated()
           
 void recover()
          recovers the dataRecorder all messages are removed and all the messsages of the logger are recoverd
 void replayRecords(IDataRecordReplay replay)
           
 void reset()
          rewinds the recorder and resets the dataLogger.
 String toString()
           
 void writeRollbackData(byte[] data)
          create a new Message with the given data
 void writeRollbackData(byte[][] data)
          create a new Message with the given data
 void writeRollforwardData(byte[] data)
          logs the given data to perfrom rollforward If writeRollforwardData is called once this method can not be called any more
 void writeRollforwardData(byte[][] data)
          logs the given data to perfrom rollforward If writeRollforwardData is called once this method can not be called any more
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

recover

public void recover()
recovers the dataRecorder all messages are removed and all the messsages of the logger are recoverd

Specified by:
recover in interface IXADataRecorder

getDataRecords

public List<IDataRecord> getDataRecords()
Specified by:
getDataRecords in interface IDataRecordSequence

isCommitting

public boolean isCommitting()
Specified by:
isCommitting in interface IXADataRecorder
Returns:
indicates that current sequence has received a ROLLFORWARD_DATA message no more logrecord are accepted except XA_DONE to complete the sequence ....

isCompleted

public boolean isCompleted()

isPrepared

public boolean isPrepared()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface IXADataRecorder
Returns:
true if no records

writeRollbackData

public void writeRollbackData(byte[] data)
create a new Message with the given data

Specified by:
writeRollbackData in interface IXADataRecorder

writeRollbackData

public void writeRollbackData(byte[][] data)
create a new Message with the given data

Specified by:
writeRollbackData in interface IXADataRecorder

writeRollforwardData

public void writeRollforwardData(byte[] data)
Description copied from interface: IXADataRecorder
logs the given data to perfrom rollforward If writeRollforwardData is called once this method can not be called any more

Specified by:
writeRollforwardData in interface IXADataRecorder

writeRollforwardData

public void writeRollforwardData(byte[][] data)
Description copied from interface: IXADataRecorder
logs the given data to perfrom rollforward If writeRollforwardData is called once this method can not be called any more

Specified by:
writeRollforwardData in interface IXADataRecorder

addMessage

public void addMessage(IDataRecord message)

replayRecords

public void replayRecords(IDataRecordReplay replay)
Specified by:
replayRecords in interface IXADataRecorder

createDataRecord

public IDataRecord createDataRecord(XALogRecordType logRecordType,
                                    byte[] recordData)
Specified by:
createDataRecord in interface IXADataRecorder

createDataRecord

public IDataRecord createDataRecord(XALogRecordType logRecordType,
                                    byte[][] recordData)
Specified by:
createDataRecord in interface IXADataRecorder

getMessageSequenceId

public long getMessageSequenceId()

compareTo

public int compareTo(Object obj)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getXADataRecorderId

public long getXADataRecorderId()
Specified by:
getXADataRecorderId in interface IDataRecordSequence
Returns:
id of the sequence of logrecord

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

reset

public void reset()
rewinds the recorder and resets the dataLogger. Information of the dataLogger is removed

Specified by:
reset in interface IXADataRecorder

close

public void close()
closes the current datalogger and rewinds

Specified by:
close in interface IXADataRecorder

isClosed

public boolean isClosed()
Specified by:
isClosed in interface IXADataRecorder

destroy

public void destroy()
destroyes the current dataLogger

Specified by:
destroy in interface IXADataRecorder

messageSequenceCreated

public void messageSequenceCreated()


Copyright © 2015. All rights reserved.