public final class BufferingTranslogWriter extends TranslogWriter
TranslogWriter.TypelastSyncedOffset, operationCounter, readLock, shardId, TRANSLOG_CODEC, VERSION, VERSION_CHECKPOINTS, VERSION_CHECKSUMS, writeLock, writtenOffsetchannel, channelReference, closed, firstOperationOffset, generation, UNKNOWN_OP_COUNT| コンストラクタと説明 |
|---|
BufferingTranslogWriter(ShardId shardId,
long generation,
org.elasticsearch.index.translog.ChannelReference channelReference,
int bufferSize) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
Translog.Location |
add(BytesReference data)
add the given bytes to the translog and return the location they were written at
|
protected void |
flush()
Flushes the buffer if the translog is buffered.
|
protected void |
readBytes(ByteBuffer targetBuffer,
long position)
reads bytes at position into the given buffer, filling it.
|
long |
sizeInBytes() |
void |
sync()
write all buffered ops to disk and fsync file
|
boolean |
syncNeeded()
returns true if there are buffered ops
|
void |
updateBufferSize(int bufferSize)
change the size of the internal buffer if relevant
|
checkpoint, closeWithTragicEvent, create, ensureOpen, getTragicException, immutableReader, newReaderFromWriter, syncUpTo, totalOperationsclose, compareTo, getFirstOperationOffset, getGeneration, isClosed, newReaderSnapshot, newSnapshot, open, path, read, read, toStringpublic BufferingTranslogWriter(ShardId shardId, long generation, org.elasticsearch.index.translog.ChannelReference channelReference, int bufferSize) throws IOException
IOExceptionpublic Translog.Location add(BytesReference data) throws IOException
TranslogWriteradd クラス内 TranslogWriterIOExceptionprotected final void flush()
throws IOException
TranslogWriterflush クラス内 TranslogWriterIOExceptionprotected void readBytes(ByteBuffer targetBuffer, long position) throws IOException
TranslogReaderreadBytes クラス内 TranslogWriterIOExceptionpublic boolean syncNeeded()
TranslogWritersyncNeeded クラス内 TranslogWriterpublic void sync()
throws IOException
TranslogWritersync クラス内 TranslogWriterIOExceptionpublic void updateBufferSize(int bufferSize)
TranslogWriterupdateBufferSize クラス内 TranslogWriterpublic long sizeInBytes()
sizeInBytes クラス内 TranslogWriterCopyright © 2009–2016. All rights reserved.