public class LogBuffers
extends java.lang.Object
implements java.lang.AutoCloseable, org.agrona.ManagedResource
UnsafeBuffer
s 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
ByteBuffer s 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()
ByteBuffer
s and wrap them for thread local access.ByteBuffer
s.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.AutoCloseable
public int termLength()
public int incRef()
public int decRef()
public void timeOfLastStateChange(long timeNs)
timeOfLastStateChange
in interface org.agrona.ManagedResource
public long timeOfLastStateChange()
timeOfLastStateChange
in interface org.agrona.ManagedResource
public void delete()
delete
in interface org.agrona.ManagedResource
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.