public class LogBuffers extends Object implements AutoCloseable, ManagedResource
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() |
void |
delete() |
UnsafeBuffer[] |
duplicateTermBuffers()
Duplicate the underlying
ByteBuffers and wrap them for thread local access. |
FileChannel |
fileChannel()
The
FileChannel for the mapped log. |
int |
incRef() |
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.
|
long |
timeOfLastStateChange() |
void |
timeOfLastStateChange(long timeNs) |
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 timeOfLastStateChange(long timeNs)
timeOfLastStateChange in interface ManagedResourcepublic long timeOfLastStateChange()
timeOfLastStateChange in interface ManagedResourcepublic void delete()
delete in interface ManagedResourceCopyright © 2014-2019 Real Logic Ltd. All Rights Reserved.