public class LogBuffers extends Object implements AutoCloseable
UnsafeBuffers as appropriate.LogBufferDescriptor| Constructor and Description |
|---|
LogBuffers(String logFileName)
Construct the log buffers for a given log file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
decRef()
Decrement reference count.
|
UnsafeBuffer[] |
duplicateTermBuffers()
Duplicate the underlying
ByteBuffers and wrap them for thread local access. |
FileChannel |
fileChannel()
The
FileChannel for the mapped log. |
int |
incRef()
Increment reference count.
|
long |
lingerDeadlineNs()
The deadline for how long to linger around once unreferenced.
|
void |
lingerDeadlineNs(long timeNs)
Set the deadline for how long to linger around once unreferenced.
|
UnsafeBuffer |
metaDataBuffer()
Get the buffer which holds the log metadata.
|
void |
preTouch()
Pre touch memory pages so they are faulted in to be available before access.
|
int |
termLength()
The length of the term buffer in each log partition.
|
public LogBuffers(String logFileName)
logFileName - to be mapped.public UnsafeBuffer[] duplicateTermBuffers()
ByteBuffers and wrap them for thread local access.ByteBuffers.public UnsafeBuffer metaDataBuffer()
public FileChannel fileChannel()
FileChannel for the mapped log.FileChannel for the mapped log.public void preTouch()
public void close()
close in interface AutoCloseablepublic int termLength()
public int incRef()
public int decRef()
public void lingerDeadlineNs(long timeNs)
timeNs - the deadline for how long to linger around once unreferenced.public long lingerDeadlineNs()
Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.