public final class Journal extends Object implements org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
abortWrite() |
void |
close() |
void |
commitWrite() |
static Journal |
create(BufferChannel chan) |
static Journal |
create(Location location) |
void |
endWrite() |
Iterator<JournalEntry> |
entries() |
Iterator<JournalEntry> |
entries(long startPosition) |
static boolean |
exists(Location location) |
String |
getFilename() |
Location |
getLocation() |
boolean |
isEmpty() |
long |
position() |
JournalEntry |
readJournal(long id) |
void |
reopen()
Forced reopen - Thread.interrupt causes java to close file.
|
void |
reset() |
long |
size() |
void |
startWrite() |
void |
sync() |
void |
truncate(long size) |
long |
write(JournalEntryType type,
ComponentId componentId,
ByteBuffer buffer)
Write an entry and return it's location in the journal
|
long |
write(PrepareState prepareState) |
long |
writeJournal(JournalEntry entry) |
long |
writeStartPosn() |
public static boolean exists(Location location)
public static Journal create(BufferChannel chan)
public void reopen()
public long writeJournal(JournalEntry entry)
public long write(PrepareState prepareState)
public long write(JournalEntryType type, ComponentId componentId, ByteBuffer buffer)
public JournalEntry readJournal(long id)
public void startWrite()
public long writeStartPosn()
public void commitWrite()
public void abortWrite()
public void endWrite()
public Iterator<JournalEntry> entries()
public Iterator<JournalEntry> entries(long startPosition)
public void sync()
sync in interface org.apache.jena.atlas.lib.Syncpublic void close()
close in interface org.apache.jena.atlas.lib.Closeablepublic long size()
public boolean isEmpty()
public void truncate(long size)
public void reset()
public long position()
public Location getLocation()
public String getFilename()
Licensed under the Apache License, Version 2.0