Class DefaultLogIndex
java.lang.Object
org.teamapps.universaldb.index.log.DefaultLogIndex
- All Implemented Interfaces:
LogIndex
public class DefaultLogIndex extends java.lang.Object implements LogIndex
-
Constructor Summary
Constructors Constructor Description DefaultLogIndex(java.io.File basePath, java.lang.String name) -
Method Summary
Modifier and Type Method Description voidclose()voiddrop()voidflush()longgetPosition()booleanisEmpty()byte[]readLog(long pos)LogIteratorreadLogs()LogIteratorreadLogs(long pos)longwriteLog(byte[] bytes, boolean committed)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.teamapps.universaldb.index.log.LogIndex
readAllLogs, writeLog
-
Constructor Details
-
DefaultLogIndex
public DefaultLogIndex(java.io.File basePath, java.lang.String name)
-
-
Method Details
-
writeLog
public long writeLog(byte[] bytes, boolean committed) -
readLog
public byte[] readLog(long pos) -
readLogs
-
readLogs
-
getPosition
public long getPosition()- Specified by:
getPositionin interfaceLogIndex
-
isEmpty
public boolean isEmpty() -
flush
public void flush() -
close
public void close() -
drop
public void drop()
-