|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TxnLog
Interface for reading transaction logs.
Nested Class Summary | |
---|---|
static interface |
TxnLog.TxnIterator
an iterating interface for reading transaction logs. |
Method Summary | |
---|---|
void |
append(org.apache.zookeeper.txn.TxnHeader hdr,
Record r)
Append a request to the transaction log |
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 |
boolean |
truncate(long zxid)
truncate the log to get in sync with the leader. |
Method Detail |
---|
void rollLog() throws IOException
IOException
void append(org.apache.zookeeper.txn.TxnHeader hdr, Record r) throws IOException
hdr
- the transaction headerr
- the transaction itself
IOException
TxnLog.TxnIterator read(long zxid) throws IOException
zxid
-
IOException
long getLastLoggedZxid() throws IOException
IOException
boolean truncate(long zxid) throws IOException
zxid
- the zxid to truncate at.
IOException
long getDbId() throws IOException
IOException
void commit() throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |