public interface TxnLog
Modifier and Type | Interface and Description |
---|---|
static interface |
TxnLog.TxnIterator
an iterating interface for reading
transaction logs.
|
Modifier and Type | Method and Description |
---|---|
boolean |
append(TxnHeader hdr,
org.apache.jute.Record r)
Append a request to the transaction log
|
void |
close()
close the transactions logs
|
void |
commit()
commmit the trasaction and make sure
they are persisted
|
long |
getDbId()
the dbid for this transaction log.
|
long |
getLastLoggedZxid()
the last zxid of the logged transactions.
|
TxnLog.TxnIterator |
read(long zxid)
Start reading the transaction logs
from a given zxid
|
void |
rollLog()
roll the current
log being appended to
|
void |
setServerStats(ServerStats serverStats)
+ * Setter for ServerStats to monitor fsync threshold exceed
+ * @param serverStats used to update fsyncThresholdExceedCount
+
|
boolean |
truncate(long zxid)
truncate the log to get in sync with the
leader.
|
void setServerStats(ServerStats serverStats)
void rollLog() throws java.io.IOException
java.io.IOException
boolean append(TxnHeader hdr, org.apache.jute.Record r) throws java.io.IOException
hdr
- the transaction headerr
- the transaction itself
returns true iff something appended, otw falsejava.io.IOException
TxnLog.TxnIterator read(long zxid) throws java.io.IOException
zxid
- java.io.IOException
long getLastLoggedZxid() throws java.io.IOException
java.io.IOException
boolean truncate(long zxid) throws java.io.IOException
zxid
- the zxid to truncate at.java.io.IOException
long getDbId() throws java.io.IOException
java.io.IOException
void commit() throws java.io.IOException
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
Copyright © 2019 The Apache Software Foundation