org.neodatis.odb.core.transaction
Interface ITransaction
-
- All Known Implementing Classes:
- DefaultTransaction
public interface ITransaction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclear()clear the transactionvoidcommit()Execute the commit process of the transactionjava.lang.StringgetName()intgetNumberOfWriteActions()booleanisArchiveLog()booleanisCommited()voidmanageWriteAction(long position, byte[] bytes)The public method to add a write action to the transaction.voidreset()Reset the transactionvoidrollback()voidsetArchiveLog(boolean archiveLog)voidsetFsiToApplyWriteActions(IFileSystemInterface fsi)voidsetWritePosition(long position)Set the write position (position in main database file).
-
-
-
Method Detail
-
clear
void clear()
clear the transaction
-
getName
java.lang.String getName()
-
isCommited
boolean isCommited()
-
rollback
void rollback()
-
commit
void commit()
Execute the commit process of the transaction- Throws:
java.lang.Exception
-
setFsiToApplyWriteActions
void setFsiToApplyWriteActions(IFileSystemInterface fsi)
-
isArchiveLog
boolean isArchiveLog()
- Returns:
- Returns the archiveLog.
-
setArchiveLog
void setArchiveLog(boolean archiveLog)
- Parameters:
archiveLog- The archiveLog to set.
-
manageWriteAction
void manageWriteAction(long position, byte[] bytes)The public method to add a write action to the transaction. If first checks if the new write action action can be appended to the current write action. It is done by checking the currentWritePositioninWA. If yes (position==currentPositioninWA, just append the WA. If not, adds the current one to the transaction and creates a new one (as current)- Parameters:
position-bytes-
-
getNumberOfWriteActions
int getNumberOfWriteActions()
- Returns:
- Returns the numberOfWriteActions.
-
setWritePosition
void setWritePosition(long position)
Set the write position (position in main database file). This is used to know if the next write can be appended to the previous one (in the same current Write Action) or not.- Parameters:
position-
-
reset
void reset()
Reset the transaction
-
-
DataMelt 3.0 © DataMelt by jWork.ORG