org.neodatis.odb.impl.core.transaction
Class DefaultWriteAction
- java.lang.Object
-
- org.neodatis.odb.impl.core.transaction.DefaultWriteAction
-
- All Implemented Interfaces:
- IWriteAction
public class DefaultWriteAction extends java.lang.Object implements IWriteAction
The WriteAction class is the description of a Write operation that will be applied to the main database file when committing. All operations(writes) that can not be written to the database file before committing , pointers (for example) are stored in WriteAction objects. The transaction keeps track of all these WriteActions. When committing, the transaction apply each WriteAction to the engine database file.
-
-
Field Summary
Fields Modifier and Type Field and Description static intcountstatic intDATA_WRITE_ACTIONstatic intDIRECT_WRITE_ACTIONstatic java.lang.StringLOG_IDstatic intPOINTER_WRITE_ACTIONstatic intUNKNOWN_WRITE_ACTION
-
Constructor Summary
Constructors Constructor and Description DefaultWriteAction(long position)DefaultWriteAction(long position, byte[] bytes)DefaultWriteAction(long position, byte[] bytes, java.lang.String label)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddBytes(byte[] bytes)voidapplyTo(IFileSystemInterface fsi, int index)voidclear()byte[]getBytes(int index)longgetPosition()booleanisEmpty()voidpersist(IFileSystemInterface fsi, int index)static DefaultWriteActionread(IFileSystemInterface fsi, int index)voidsetPosition(long position)java.lang.StringtoString()
-
-
-
Field Detail
-
count
public static int count
-
UNKNOWN_WRITE_ACTION
public static final int UNKNOWN_WRITE_ACTION
- See Also:
- Constant Field Values
-
DATA_WRITE_ACTION
public static final int DATA_WRITE_ACTION
- See Also:
- Constant Field Values
-
POINTER_WRITE_ACTION
public static final int POINTER_WRITE_ACTION
- See Also:
- Constant Field Values
-
DIRECT_WRITE_ACTION
public static final int DIRECT_WRITE_ACTION
- See Also:
- Constant Field Values
-
LOG_ID
public static final java.lang.String LOG_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultWriteAction
public DefaultWriteAction(long position)
-
DefaultWriteAction
public DefaultWriteAction(long position, byte[] bytes)
-
DefaultWriteAction
public DefaultWriteAction(long position, byte[] bytes, java.lang.String label)
-
-
Method Detail
-
getPosition
public long getPosition()
- Specified by:
getPositionin interfaceIWriteAction
-
setPosition
public void setPosition(long position)
-
getBytes
public byte[] getBytes(int index)
- Specified by:
getBytesin interfaceIWriteAction
-
addBytes
public void addBytes(byte[] bytes)
- Specified by:
addBytesin interfaceIWriteAction
-
persist
public void persist(IFileSystemInterface fsi, int index)
- Specified by:
persistin interfaceIWriteAction
-
read
public static DefaultWriteAction read(IFileSystemInterface fsi, int index)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
applyTo
public void applyTo(IFileSystemInterface fsi, int index)
- Specified by:
applyToin interfaceIWriteAction
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceIWriteAction
-
clear
public void clear()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG