Package org.elasticsearch.index.translog
Class TranslogConfig
java.lang.Object
org.elasticsearch.index.translog.TranslogConfig
public final class TranslogConfig
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static ByteSizeValueDEFAULT_BUFFER_SIZEstatic ByteSizeValueEMPTY_TRANSLOG_BUFFER_SIZE -
Constructor Summary
Constructors Constructor Description TranslogConfig(ShardId shardId, java.nio.file.Path translogPath, IndexSettings indexSettings, BigArrays bigArrays)Creates a new TranslogConfig instance -
Method Summary
Modifier and Type Method Description BigArraysgetBigArrays()Returns a BigArrays instance for this engineByteSizeValuegetBufferSize()The translog buffer size.IndexSettingsgetIndexSettings()Returns the index indexSettingsShardIdgetShardId()Returns the shard ID this config is created forjava.nio.file.PathgetTranslogPath()Returns the translog path for this engineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
DEFAULT_BUFFER_SIZE
-
EMPTY_TRANSLOG_BUFFER_SIZE
-
-
Constructor Details
-
TranslogConfig
public TranslogConfig(ShardId shardId, java.nio.file.Path translogPath, IndexSettings indexSettings, BigArrays bigArrays)Creates a new TranslogConfig instance- Parameters:
shardId- the shard ID this translog belongs totranslogPath- the path to use for the transaction log filesindexSettings- the index settings used to set internal variablesbigArrays- a bigArrays instance used for temporarily allocating write operations
-
-
Method Details
-
getIndexSettings
Returns the index indexSettings -
getShardId
Returns the shard ID this config is created for -
getBigArrays
Returns a BigArrays instance for this engine -
getTranslogPath
public java.nio.file.Path getTranslogPath()Returns the translog path for this engine -
getBufferSize
The translog buffer size. Default is8kb
-