public class LogBuffers
extends java.lang.Object
implements java.lang.AutoCloseable, org.agrona.ManagedResource
UnsafeBuffers as appropriate.LogBufferDescriptor| Constructor and Description |
|---|
LogBuffers(java.lang.String logFileName)
Construct the log buffers for a given log file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
decRef() |
void |
delete() |
org.agrona.concurrent.UnsafeBuffer[] |
duplicateTermBuffers()
Duplicate the underlying
ByteBuffers and wrap them for thread local access. |
java.nio.channels.FileChannel |
fileChannel()
The
FileChannel for the mapped log. |
int |
incRef() |
org.agrona.concurrent.UnsafeBuffer |
metaDataBuffer()
Get the buffer which holds the log metadata.
|
int |
termLength()
The length of the term buffer in each log partition.
|
long |
timeOfLastStateChange() |
void |
timeOfLastStateChange(long timeNs) |
public LogBuffers(java.lang.String logFileName)
logFileName - to be mapped.public org.agrona.concurrent.UnsafeBuffer[] duplicateTermBuffers()
ByteBuffers and wrap them for thread local access.ByteBuffers.public org.agrona.concurrent.UnsafeBuffer metaDataBuffer()
public java.nio.channels.FileChannel fileChannel()
FileChannel for the mapped log.FileChannel for the mapped log.public void close()
close in interface java.lang.AutoCloseablepublic int termLength()
public int incRef()
public int decRef()
public void timeOfLastStateChange(long timeNs)
timeOfLastStateChange in interface org.agrona.ManagedResourcepublic long timeOfLastStateChange()
timeOfLastStateChange in interface org.agrona.ManagedResourcepublic void delete()
delete in interface org.agrona.ManagedResourceCopyright © 2014-2018 Real Logic Ltd. All Rights Reserved.