Class ChunkedLogIndex
java.lang.Object
org.teamapps.universaldb.index.log.ChunkedLogIndex
public class ChunkedLogIndex
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ChunkedLogIndex(java.io.File path, java.lang.String name, int entriesPerChunk, boolean rotatingLogIndex) -
Method Summary
Modifier and Type Method Description voidclose()intgetChunkCount()byte[]getLastEntry()intgetLogEntryCount()LogIndexgetLogIndex()intgetMessagesInCurrentChunk()longgetPositionByChunkChunkCount(int chunkCount)java.util.List<byte[]>readLastLogEntries(int numberOfEntries)byte[]readLog(long pos)longwriteLog(byte[] bytes)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ChunkedLogIndex
public ChunkedLogIndex(java.io.File path, java.lang.String name, int entriesPerChunk, boolean rotatingLogIndex)
-
-
Method Details
-
getMessagesInCurrentChunk
public int getMessagesInCurrentChunk() -
writeLog
public long writeLog(byte[] bytes) -
readLog
public byte[] readLog(long pos) -
getLastEntry
public byte[] getLastEntry() -
readLastLogEntries
public java.util.List<byte[]> readLastLogEntries(int numberOfEntries) -
getLogEntryCount
public int getLogEntryCount() -
getChunkCount
public int getChunkCount() -
getPositionByChunkChunkCount
public long getPositionByChunkChunkCount(int chunkCount) -
close
public void close() -
getLogIndex
-