Package com.db4o.internal.fileheader
Class NewFileHeaderBase
- java.lang.Object
-
- com.db4o.internal.fileheader.FileHeader
-
- com.db4o.internal.fileheader.NewFileHeaderBase
-
- Direct Known Subclasses:
FileHeader1
,FileHeader2
public abstract class NewFileHeaderBase extends FileHeader
-
-
Field Summary
Fields Modifier and Type Field Description protected TimerFileLock
_timerFileLock
protected FileHeaderVariablePart
_variablePart
protected static int
ACCESS_TIME_OFFSET
protected static int
HEADER_LOCK_OFFSET
protected static int
OPEN_TIME_OFFSET
protected static byte[]
SIGNATURE
-
Fields inherited from class com.db4o.internal.fileheader.FileHeader
TRANSACTION_POINTER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description NewFileHeaderBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
checkThreadFileLock(LocalObjectContainer container, ByteArrayBuffer reader)
void
close()
java.lang.Runnable
commit(boolean shuttingDown)
void
completeInterruptedTransaction(LocalObjectContainer container)
protected abstract NewFileHeaderBase
createNew()
abstract FileHeaderVariablePart
createVariablePart(LocalObjectContainer file)
void
initNew(LocalObjectContainer file)
protected FileHeader
newOnSignatureMatch(LocalObjectContainer file, ByteArrayBuffer reader)
protected void
newTimerFileLock(LocalObjectContainer file)
protected void
oldEncryptionOff(LocalObjectContainer file)
void
readIdentity(LocalObjectContainer container)
protected abstract byte
version()
void
writeVariablePart(LocalObjectContainer file, boolean shuttingDown)
-
Methods inherited from class com.db4o.internal.fileheader.FileHeader
convert, length, lockedByOtherSession, newCurrentFileHeader, read, read, signatureMatches, timeToWrite, writeFixedPart, writeTransactionPointer, writeTransactionPointer, writeVariablePart
-
-
-
-
Field Detail
-
SIGNATURE
protected static final byte[] SIGNATURE
-
HEADER_LOCK_OFFSET
protected static final int HEADER_LOCK_OFFSET
-
OPEN_TIME_OFFSET
protected static final int OPEN_TIME_OFFSET
-
ACCESS_TIME_OFFSET
protected static final int ACCESS_TIME_OFFSET
-
_timerFileLock
protected TimerFileLock _timerFileLock
-
_variablePart
protected FileHeaderVariablePart _variablePart
-
-
Method Detail
-
close
public void close() throws Db4oIOException
- Specified by:
close
in classFileHeader
- Throws:
Db4oIOException
-
newTimerFileLock
protected void newTimerFileLock(LocalObjectContainer file)
-
createNew
protected abstract NewFileHeaderBase createNew()
-
version
protected abstract byte version()
-
initNew
public final void initNew(LocalObjectContainer file) throws Db4oIOException
- Specified by:
initNew
in classFileHeader
- Throws:
Db4oIOException
-
createVariablePart
public abstract FileHeaderVariablePart createVariablePart(LocalObjectContainer file)
-
oldEncryptionOff
protected void oldEncryptionOff(LocalObjectContainer file)
-
writeVariablePart
public final void writeVariablePart(LocalObjectContainer file, boolean shuttingDown)
- Specified by:
writeVariablePart
in classFileHeader
-
newOnSignatureMatch
protected FileHeader newOnSignatureMatch(LocalObjectContainer file, ByteArrayBuffer reader)
- Specified by:
newOnSignatureMatch
in classFileHeader
-
completeInterruptedTransaction
public void completeInterruptedTransaction(LocalObjectContainer container)
- Specified by:
completeInterruptedTransaction
in classFileHeader
-
checkThreadFileLock
protected void checkThreadFileLock(LocalObjectContainer container, ByteArrayBuffer reader)
-
readIdentity
public void readIdentity(LocalObjectContainer container)
- Specified by:
readIdentity
in classFileHeader
-
commit
public java.lang.Runnable commit(boolean shuttingDown)
- Specified by:
commit
in classFileHeader
-
-