|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.index.shard.AbstractIndexShardComponent
org.elasticsearch.index.translog.fs.FsTranslog
public class FsTranslog
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.index.translog.Translog |
---|
Translog.Create, Translog.Delete, Translog.DeleteByQuery, Translog.Index, Translog.Location, Translog.Operation, Translog.Snapshot, Translog.Source |
Field Summary |
---|
Fields inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent |
---|
componentSettings, indexSettings, logger, shardId |
Fields inherited from interface org.elasticsearch.index.translog.Translog |
---|
TRANSLOG_ID_KEY |
Constructor Summary | |
---|---|
FsTranslog(ShardId shardId,
Settings indexSettings,
java.io.File location)
|
|
FsTranslog(ShardId shardId,
Settings indexSettings,
NodeEnvironment nodeEnv)
|
Method Summary | |
---|---|
Translog.Location |
add(Translog.Operation operation)
Adds a create operation to the transaction log. |
void |
clearUnreferenced()
Clears unreferenced transaclogs. |
void |
close(boolean delete)
Closes the transaction log. |
long |
currentId()
Returns the id of the current transaction log. |
int |
estimatedNumberOfOperations()
Returns the number of operations in the transaction log. |
java.io.File[] |
locations()
|
void |
makeTransientCurrent()
Swaps the transient translog to be the current one. |
long |
memorySizeInBytes()
The estimated memory size this translog is taking. |
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. |
byte[] |
read(Translog.Location location)
|
void |
revertTransient()
Reverts back to not have a transient translog. |
FsChannelSnapshot |
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. |
void |
sync()
Sync's the translog. |
void |
syncOnEachOperation(boolean syncOnEachOperation)
|
long |
translogSizeInBytes()
Returns the size in bytes of the translog. |
Methods inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent |
---|
indexSettings, managementGroupName, nodeName, shardId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.elasticsearch.index.shard.IndexShardComponent |
---|
indexSettings, shardId |
Constructor Detail |
---|
@Inject public FsTranslog(ShardId shardId, @IndexSettings Settings indexSettings, NodeEnvironment nodeEnv)
public FsTranslog(ShardId shardId, @IndexSettings Settings indexSettings, java.io.File location)
Method Detail |
---|
public java.io.File[] locations()
public long currentId()
Translog
currentId
in interface Translog
public int estimatedNumberOfOperations()
Translog
estimatedNumberOfOperations
in interface Translog
public long memorySizeInBytes()
Translog
memorySizeInBytes
in interface Translog
public long translogSizeInBytes()
Translog
translogSizeInBytes
in interface Translog
public void clearUnreferenced()
Translog
clearUnreferenced
in interface Translog
public void newTranslog(long id) throws TranslogException
Translog
Can only be called by one thread.
newTranslog
in interface Translog
TranslogException
public void newTransientTranslog(long id) throws TranslogException
Translog
Can only be called by one thread.
newTransientTranslog
in interface Translog
TranslogException
public void makeTransientCurrent()
Translog
Can only be called by one thread.
makeTransientCurrent
in interface Translog
public void revertTransient()
Translog
revertTransient
in interface Translog
public byte[] read(Translog.Location location)
read
in interface Translog
public Translog.Location add(Translog.Operation operation) throws TranslogException
Translog
add
in interface Translog
TranslogException
public FsChannelSnapshot snapshot() throws TranslogException
Translog
snapshot
in interface Translog
TranslogException
public Translog.Snapshot snapshot(Translog.Snapshot snapshot)
Translog
snapshot
in interface Translog
public void sync()
Translog
sync
in interface Translog
public void syncOnEachOperation(boolean syncOnEachOperation)
syncOnEachOperation
in interface Translog
public void close(boolean delete)
Translog
Can only be called by one thread.
close
in interface Translog
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |