java.lang.Object
org.apache.jena.tdb1.transaction.Journal
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable
The Journal is slightly odd - it is append-only for write but random read.
The write performance is more important than read; reads only happen
if the journal grows to the point where it needs to free up cache.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidappend()voidclose()voidstatic JournalvoidendWrite()entries()entries(long startPosition) static booleanbooleanisEmpty()longposition()voidposition(long posn) readJournal(long id) voidreopen()Forced reopen - thread.interrupt causes java to close file.longsize()voidjournal.startWrite(); try { journal.write journal.commitWrite(); } catch (Thowable ex) { journal.abortWrite(); } finally { journal.endWrite(); }voidsync()voidtruncate(long size) longwrite(JournalEntryType type, FileRef fileRef, Block block) longwriteJournal(JournalEntry entry) long
-
Constructor Details
-
Journal
-
-
Method Details
-
exists
-
create
-
reopen
public void reopen()Forced reopen - thread.interrupt causes java to close file. Attempt to close, open, and position. -
writeJournal
-
write
-
readJournal
-
entries
-
entries
-
startWrite
public void startWrite()journal.startWrite(); try { journal.write journal.commitWrite(); } catch (Thowable ex) { journal.abortWrite(); } finally { journal.endWrite(); } -
writeStartPosn
public long writeStartPosn() -
commitWrite
public void commitWrite() -
abortWrite
public void abortWrite() -
endWrite
public void endWrite() -
sync
public void sync() -
close
public void close()- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
size
public long size() -
isEmpty
public boolean isEmpty() -
truncate
public void truncate(long size) -
append
public void append() -
position
public long position() -
position
public void position(long posn) -
getFilename
-