Class TranslogConfig

java.lang.Object
org.elasticsearch.index.translog.TranslogConfig

public final class TranslogConfig extends Object
  • Field Details

    • DEFAULT_BUFFER_SIZE

      public static final ByteSizeValue DEFAULT_BUFFER_SIZE
    • EMPTY_TRANSLOG_BUFFER_SIZE

      public static final ByteSizeValue EMPTY_TRANSLOG_BUFFER_SIZE
    • NOOP_OPERATION_LISTENER

      public static final OperationListener NOOP_OPERATION_LISTENER
  • Constructor Details

  • Method Details

    • getIndexSettings

      public IndexSettings getIndexSettings()
      Returns the index indexSettings
    • getShardId

      public ShardId getShardId()
      Returns the shard ID this config is created for
    • getBigArrays

      public BigArrays getBigArrays()
      Returns a BigArrays instance for this engine
    • getTranslogPath

      public Path getTranslogPath()
      Returns the translog path for this engine
    • getBufferSize

      public ByteSizeValue getBufferSize()
      The translog buffer size. Default is 8kb
    • getDiskIoBufferPool

      public DiskIoBufferPool getDiskIoBufferPool()
      DiskIoBufferPool for this engine. Used to allow custom pools in tests, always returns DiskIoBufferPool.INSTANCE in production.
    • getOperationListener

      public OperationListener getOperationListener()
    • fsync

      public boolean fsync()
      Returns:
      true if translog writes need to be followed by fsync
    • hasTranslog

      public boolean hasTranslog()
      Returns:
      true if the configuration allows the Translog files to exist, false otherwise. In the case there is no translog, the shard is not writeable.