public interface Translog extends IndexShardComponent, CloseableIndexComponent, org.apache.lucene.util.Accountable
Modifier and Type | Interface and Description |
---|---|
static class |
Translog.Create |
static class |
Translog.Delete |
static class |
Translog.DeleteByQuery |
static class |
Translog.Index |
static class |
Translog.Location |
static interface |
Translog.Operation
A generic interface representing an operation performed on the transaction log.
|
static interface |
Translog.Snapshot
A snapshot of the transaction log, allows to iterate over all the transaction log operations.
|
static class |
Translog.Source |
Modifier and Type | Field and Description |
---|---|
static ByteSizeValue |
INACTIVE_SHARD_TRANSLOG_BUFFER |
static String |
TRANSLOG_ID_KEY |
Modifier and Type | Method and Description |
---|---|
Translog.Location |
add(Translog.Operation operation)
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.Operation |
read(Translog.Location location) |
void |
revertTransient()
Reverts back to not have a transient translog.
|
Translog.Snapshot |
snapshot()
Snapshots the current transaction log allowing to safely iterate over the snapshot.
|
Translog.Snapshot |
snapshot(Translog.Snapshot snapshot)
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 bufferSize) |
indexSettings, shardId
close
static final ByteSizeValue INACTIVE_SHARD_TRANSLOG_BUFFER
static final String TRANSLOG_ID_KEY
void updateBuffer(ByteSizeValue bufferSize)
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)
TranslogStats stats()
Copyright © 2009–2015. All rights reserved.