Package com.db4o.internal.fileheader
Class FileHeader
- java.lang.Object
-
- com.db4o.internal.fileheader.FileHeader
-
- Direct Known Subclasses:
NewFileHeaderBase
public abstract class FileHeader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
TRANSACTION_POINTER_LENGTH
-
Constructor Summary
Constructors Constructor Description FileHeader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close()
abstract java.lang.Runnable
commit(boolean shuttingDown)
abstract void
completeInterruptedTransaction(LocalObjectContainer container)
FileHeader
convert(LocalObjectContainer file)
abstract void
initNew(LocalObjectContainer file)
abstract int
length()
static boolean
lockedByOtherSession(LocalObjectContainer container, long lastAccessTime)
static NewFileHeaderBase
newCurrentFileHeader()
protected abstract FileHeader
newOnSignatureMatch(LocalObjectContainer file, ByteArrayBuffer reader)
static FileHeader
read(LocalObjectContainer file)
protected abstract void
read(LocalObjectContainer file, ByteArrayBuffer reader)
abstract void
readIdentity(LocalObjectContainer container)
protected boolean
signatureMatches(ByteArrayBuffer reader, byte[] signature, byte version)
protected long
timeToWrite(long time, boolean shuttingDown)
abstract void
writeFixedPart(LocalObjectContainer file, boolean startFileLockingThread, boolean shuttingDown, StatefulBuffer writer, int blockSize)
abstract void
writeTransactionPointer(Transaction systemTransaction, int transactionPointer)
protected void
writeTransactionPointer(Transaction systemTransaction, int transactionPointer, int address, int offset)
void
writeVariablePart(LocalObjectContainer file)
abstract void
writeVariablePart(LocalObjectContainer file, boolean shuttingDown)
-
-
-
Field Detail
-
TRANSACTION_POINTER_LENGTH
public static final int TRANSACTION_POINTER_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
newCurrentFileHeader
public static NewFileHeaderBase newCurrentFileHeader()
-
read
public static FileHeader read(LocalObjectContainer file) throws OldFormatException
- Throws:
OldFormatException
-
convert
public FileHeader convert(LocalObjectContainer file)
-
close
public abstract void close() throws Db4oIOException
- Throws:
Db4oIOException
-
initNew
public abstract void initNew(LocalObjectContainer file) throws Db4oIOException
- Throws:
Db4oIOException
-
completeInterruptedTransaction
public abstract void completeInterruptedTransaction(LocalObjectContainer container)
-
length
public abstract int length()
-
newOnSignatureMatch
protected abstract FileHeader newOnSignatureMatch(LocalObjectContainer file, ByteArrayBuffer reader)
-
timeToWrite
protected long timeToWrite(long time, boolean shuttingDown)
-
read
protected abstract void read(LocalObjectContainer file, ByteArrayBuffer reader)
-
signatureMatches
protected boolean signatureMatches(ByteArrayBuffer reader, byte[] signature, byte version)
-
writeFixedPart
public abstract void writeFixedPart(LocalObjectContainer file, boolean startFileLockingThread, boolean shuttingDown, StatefulBuffer writer, int blockSize)
-
writeTransactionPointer
public abstract void writeTransactionPointer(Transaction systemTransaction, int transactionPointer)
-
writeTransactionPointer
protected void writeTransactionPointer(Transaction systemTransaction, int transactionPointer, int address, int offset)
-
writeVariablePart
public void writeVariablePart(LocalObjectContainer file)
-
writeVariablePart
public abstract void writeVariablePart(LocalObjectContainer file, boolean shuttingDown)
-
lockedByOtherSession
public static boolean lockedByOtherSession(LocalObjectContainer container, long lastAccessTime)
-
readIdentity
public abstract void readIdentity(LocalObjectContainer container)
-
commit
public abstract java.lang.Runnable commit(boolean shuttingDown)
-
-