public interface Translog extends IndexShardComponent, CloseableIndexComponent , org .apache .lucene .util .Accountable
| Modifier and Type | Interface and Description |
|---|---|
static class |
Translog
|
static class |
Translog
|
static class |
Translog
|
static class |
Translog
|
static class |
Translog
|
static interface |
Translog
A generic interface representing an operation performed on the transaction log.
|
static interface |
Translog
A snapshot of the transaction log, allows to iterate over all the transaction log operations.
|
static class |
Translog
|
| Modifier and Type | Field and Description |
|---|---|
static ByteSizeValue |
INACTIVE_SHARD_TRANSLOG_BUFFER
|
static String |
TRANSLOG_ID_KEY
|
| Modifier and Type | Method and Description |
|---|---|
Translog |
add(Translog
Adds a create operation to the transaction log.
|
int |
clearUnreferenced()
Clears unreferenced transaction logs.
|
void |
closeWithDelete()
|
long |
currentId()
Returns the id of the current transaction log.
|
int |
estimatedNumberOfOperations()
Returns the number of operations in the transaction log.
|
void |
makeTransientCurrent()
Swaps the transient translog to be the current one.
|
void |
newTransientTranslog(long id)
Creates a new transient translog, where added ops will be added to the current one, and to it.
|
void |
newTranslog(long id)
Creates a new transaction log internally.
|
Translog |
read(Translog
|
void |
revertTransient()
Reverts back to not have a transient translog.
|
Translog |
snapshot()
Snapshots the current transaction log allowing to safely iterate over the snapshot.
|
Translog |
snapshot(Translog
Snapshots the delta between the current state of the translog, and the state defined by the provided snapshot.
|
TranslogStats |
stats()
return stats
|
void |
sync()
Sync's the translog.
|
boolean |
syncNeeded()
|
void |
syncOnEachOperation(boolean syncOnEachOperation)
|
long |
translogSizeInBytes()
Returns the size in bytes of the translog.
|
void |
updateBuffer(ByteSizeValue
|
indexSettings, shardIdclosestatic final ByteSizeValueINACTIVE_SHARD_TRANSLOG_BUFFER
static final StringTRANSLOG_ID_KEY
void updateBuffer(ByteSizeValuebufferSize)
void closeWithDelete()
long currentId()
int estimatedNumberOfOperations()
long translogSizeInBytes()
void newTranslog(long id)
throws TranslogException
Can only be called by one thread.
TranslogException
void newTransientTranslog(long id)
throws TranslogException
Can only be called by one thread.
TranslogException
void makeTransientCurrent()
Can only be called by one thread.
void revertTransient()
Translog.Location add(Translog .Operation operation) throws TranslogException
TranslogException
Translog.Operation read(Translog .Location location)
Translog.Snapshot snapshot() throws TranslogException
TranslogException
Translog.Snapshot snapshot(Translog .Snapshot snapshot)
int clearUnreferenced()
void sync() throws IOException
IOException
boolean syncNeeded()
void syncOnEachOperation(boolean syncOnEachOperation)
TranslogStatsstats()